vb.net - Reader = comm.ExecuteReader Multiple-step OLE DB operation generated errors -


i trying write code checks whether query generates rows use of reader.hasrows property. stuck error:

an unhandled exception of type 'system.data.oledb.oledbexception' occurred in system.data.dll

additional information: multiple-step ole db operation generated errors. check each ole db status value, if available. no work done.

the visual studio debugger says error comes statement:

reader = comm.executereader

this code:

    dim reader oledbdatareader     myconn.connectionstring = connstring      myconn.open()     dim checkquery string = "select * parentandguardian first_name = @firstname , middle_name = @middlename , last_name = @lastname"     dim comm new oledbcommand(checkquery, myconn)      comm.parameters.addwithvalue("@firstname", txtfirstname)     comm.parameters.addwithvalue("@middlename", txtmiddlename)     comm.parameters.addwithvalue("@lastname", txtlastname)      reader = comm.executereader      if (reader.hasrows)         messagebox.show("match found")     else         messagebox.show("there no matches found")     end if     myconn.close()      me.close() 

i hope can me.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -