ITFreshmen
Posts: 1
|
| Posted: 02/25/2008, 8:14 PM |
|
Im trying to retreive value form a list bost to determine what user need(same as name in dbase column and then they will type in the name that they're looking for....
here my codes :-
Thanks in advance!
-----------------------------------------------------------------------------------------------------------------------------
<%
Dim sn
Dim sn_numRows
Set sn = Server.CreateObject("ADODB.Recordset")
sn.ActiveConnection = MM_database_STRING
sn.Source = "SELECT * FROM doc WHERE "+request("select")+" LIKE "+request("name")+""
sn.CursorType = 0
sn.CursorLocation = 2
sn.LockType = 1
sn.Open()
sn_numRows = 0
%>
-----------------------------------------------------------------------------------------------------------------------
ERROR THAT I GOT :
Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '='.
/tryname.asp, line 13
________________________________________________________________________
_________________
mShazuan |
 |
 |
Oper
Posts: 1195
|
| Posted: 02/28/2008, 6:42 PM |
|
A.S.A.P and 1 post dont work well in one thread.
(This is a Member forum help, CCS not involved sometime peterr help)
Support ticked always help
this is for grid? or? explain
also try to check few sample and help will help you a lot.
beforeselect and beforebuildselect Events
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
rstewart
Posts: 17
|
| Posted: 02/28/2008, 8:25 PM |
|
"SELECT * FROM doc WHERE "+request("select")+" LIKE "+request("name")+""
usually data type error e.g. quotes missing on strings
1. use & instead of +
2. add single quotes to surround strings
"SELECT * FROM doc WHERE '" & request("select") & "' LIKE "' & request("name") & "'"
notice the single and double quotes side by side
WHERE '" (single then double
& "' double then single , etc, etc.
_________________
looking for work in a sunny country. |
 |
 |
|