Hi,
This is a simple database query, I dont know SQL server syntax, so this is oracle syntax that you can edit:
[CODE]
using oraConn as oracleconnection = new oracleconnection(configurationmanager.connectionstrings("db").connectionstring)
using oraCmd as oraclecommand = new oraclecommand("select * from table where service_keywords like (:QUERY)", oraconn)
oraCmd.connection.open
oraCmd.parameters.addwithvalue("QUERY", "%" & txtQuery.text & "%")
dim oraDread as oracledatareader = nothing
oraDread = oraCmd.Executereader
if oraDread isnot nothing andalso oradread.hasrows
do while oraDread.read
' your code to do the stuff with the results goes here
loop
oraDread.close
end if
oracmd.connection.close
end using
end using
[/CODE]
That should see you right. If you want the results in a dataset, use a dataadapter and call fill on it passing in the dataset.
Regards
Simon C
Enter your message below
Sign in or Join us (it's free).