我的数据库是sybase11,现在我想通过存储过程取数据,请问各位大虾,该怎么做?
dim objdataset as new dataset()
dim objadapter as odbcdataadapter
dim mycommand as new odbccommand
dim dt as datatable
sub page_load(sender as object,e as eventargs)
dim cn as new odbcConnection("Driver={SYBASE SYSTEM 11};Srvr=lr_db;Uid=aa;Pwd=aaaaaa;")
cn.open()
mycommand.connection=cn
mycommand.commandtext="LR_IMPORT_NZG"
mycommand.commandtype=commandtype.storedprocedure
dgemps.datasource=mycommand.executereader(commandbehavior.closeconnection)
dgemps.CurrentPageIndex = 0
dgemps.databind()
'dt=objdataset.tables("news")
end sub
我的写法如上所示,可是执行的时候总是提示lr_import_nzg没有找到,可是这个执行过程是确实存在的,是不是executereaderb不对,在odbc中该怎么写呢?拜托了,各位高手!