If you are querying SQL server, you need to use a percent sign % as a wildcard in your like statement
Printable View
If you are querying SQL server, you need to use a percent sign % as a wildcard in your like statement
This is and ASP ADO SQL statement
<%
myDSN="DSN=INVENTORY;User Id=invuser;password=invpassword"
set conntemp=server.createobject("adodb.connection")
conntemp.Open myDSN
mySQL="select * from MAIN WHERE [WORKSTATION NAME]"
mySQL= mySQL & " LIKE'"
mySQL= mySQL & EDITLISTNAME & "'"
scriptresponder="editlist2.asp"
'set conntemp=server.createobject("adodb.connection")
'conntemp.open myDSN
set rstemp=conntemp.execute(mySQL)
%>
The result didn't return anything. Did I do something wrong with SQL LIKE statment?
Thanks...