Set dbexample = CreateObject("ADODB.connection")
dbexample.ConnectionString = ="DSN=abcd;DATABASE=unit;SERVER=abcd;UID=abc;PWD=a bc"
var = "11110"
query = "select * from orders where ordernumber ="&var
Set Ret = dbexample.Execute(query)
when ever I Run this code I get an error "Error : Too Few Arguments ". I tried several other methods too.
Actually if the query is replaced witha query without where clause then it works fine but now in this case.
Can Any pleas correct the above code.
Thanks for reply
but this has realy not solved the prblem
Same error "Too few arguments:Expected 1"
This is working well for every query but not for the queries with where clause
Can u please sugest some other way out
I have one query. If the record does not exist then it should return a blank recordset. Why is it throwing an Error? Because as it is a variable so any value it may have. If it thros error then it would not be an idear script. Please clarify.
Hi madhushila you are right.
this is indeed a good questtion why it should return an error
it should return a blank record set.
Tarun, can u plerase clarify on this thing.
According to me the query(SQL) is ok.
Then why it should give an error