vb.net - Not able to get data from oracle server to System.Data.DataTable -


i calling below query vb.net application oracle server , same query got executed on oracle sql developer , gives result properly. when same query called vb.net code below, result comes 0 rows in data table without exception.

thanks in advance.

oracle

with sdk (select roll_no student roll_no='1001';) select * sdk; 

vb

dim myconnectionstring string = "provider=msdaora.1;data source=student;user id=ss;password=1234; dim myoledbconnection new oledbconnection(myconnectionstring)  dim lodatatable new datatable dim locommand new oledbcommand dim lodataadapter new oledbdataadapter  locommand.commandtext = "with sdk (select roll_no student roll_no='1001')select * sdk;"                 locommand.commandtype = commandtype.text locommand.connection = myoledbconnection locommand.commandtimeout = 0 lodataadapter.selectcommand = locommand lodataadapter.fill(lodatatable) 

you have 2 different queries:

with sdk (select roll_no student roll_no='1001';) 

vs

with sdk (select roll_no student roll_no='1005') 

so guess have data roll_no = 1001, not roll_no = 1005


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -