| 发表于:2007-01-06 14:23:23 楼主 |
定义了个函数 public function runcard_query(byval strtype as string, byval strdate as string, byval strclass as string) as dataset dim data as new dataset() dscommand.selectcommand = new sqlcommand( "select max(cast(substring(runcard,2,9) as integer)) as num from runcard where type = ' " + strtype + " ' and classname = ' " + strclass + " ' and runcard like ' " + strdate + " ' + '% ' ", con) 'dscommand.selectcommand = new sqlcommand( "select count(*) as num from runcard where type = ' " + strtype + " ' and classname = ' " + strclass + " ' and runcard like ' " + strdate + " ' + '% ' ", con) dscommand.fill(data) runcard_query = data end function 引用 ds = mysqldata.runcard_query( "wafer_lot ", strdate, "pro ") dim i as integer dim j as integer i = ds.tables(0).rows(0)( "num ") j = i + 1 …… 结果运行就说从类型“dbnull”到类型“integer”的强制转换无效,请高手指教,急!!! |
|
|
|
|