帮帮忙吧!!把这两条语句合在一起...在线等
求助::两条语句合在一起....
sql= "insert into ghghh(ITEM,STK,BIN,INV_CD,QTY_BY_LOC,LOT) select * from OpenRowSet( 'microsoft.jet.oledb.4.0 ', 'Excel 8.0;HDR=Yes;database= " & path & "; ', 'select ITEM,STK,BIN,INV_CD, QTY_BY_LOC, LOT from [Sheet1$] ') "
sql1 = "insert into ghghh(nian,yue) values ( " & Txtyear.Text & ", " & txtmth.Text & ") "
[解决办法]
sql= "insert into ghghh(
ITEM,STK,BIN,INV_CD,QTY_BY_LOC,LOT
,nian,yue
)
select *
, & Txtyear.Text & ", " & txtmth.Text & "
from OpenRowSet( 'microsoft.jet.oledb.4.0 ', 'Excel 8.0;HDR=Yes;database= " & path & "; ', 'select ITEM,STK,BIN,INV_CD, QTY_BY_LOC, LOT from [Sheet1$] ') "
*****************************************************************************
欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html