When I use connection object (ADO) to execute this statement 
Author Message
 When I use connection object (ADO) to execute this statement

"SELECT * FROM User WHERE usrid.usrid = ' administrator ' AND
usrid.passwd=CONVERT(varbinary, '" & vbString & "')"

It said the vbString column doesn't exist.
But actually it is just a String.
How can I tell SQL Server 7 that it is a String(nvarchar) but not column ?

thanks for help



Thu, 13 Nov 2003 13:26:44 GMT  
 When I use connection object (ADO) to execute this statement
You statement should be something like this:
"SELECT * FROM User WHERE usrid.usrid = 'administrator' AND
usrid.passwd=" & CONVERT(varbinary, vbString)

Any string that you wanted to included from a variable should not included
in the paranthesis " ".

Hope this helps

--

Regards,

David Voo

Quote:
> "SELECT * FROM User WHERE usrid.usrid = ' administrator ' AND
> usrid.passwd=CONVERT(varbinary, '" & vbString & "')"

> It said the vbString column doesn't exist.
> But actually it is just a String.
> How can I tell SQL Server 7 that it is a String(nvarchar) but not column ?

> thanks for help



Sat, 15 Nov 2003 12:04:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB skip ADO Connection.Execute statement

2. errors different when executing SQL statements via recordset or connection object

3. ADO problem with multiple SQL statements using execute method

4. ADO Command Object using Multiple Connection Objects

5. how to run macro using the ado connection in a with statement

6. Using the ADO Command Object to send an Execute command

7. Trouble w/connection.execute command and for each statement

8. ON ERROR GOTO does not fire using ADO connection object

9. Trouble w/connection.execute command and for each statement

10. problems using OpenSchema method of an ADO connection object

11. -2147467259 Unspecified error using ADO 2.5 connection object

12. Data bound controls using Adodc and ADO connection object

 

 
Powered by phpBB® Forum Software