|
Web Development & Graphic Design Problem Solving for Graphic Design, PHP, ASP, Perl, MySQL, SQL, XML, HTML issues |
|
Topic Tools |
#1
|
|||
|
|||
Getting Odd SQL Error message
Ok, so I have no idea why a certain web page is giving up this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'LIKE'. /iframe-searchwarranty.asp, line 157 When I look at the ASP code it looks like this: <% 'on error resume next sql= "select warrantynumber, custname, custCity, custState, date_warranty_request_doc, Date_installation_doc, date_rgn_doc from warranty_doc where" 'use j variable to select if put an "AND" 'use k variable to select if the statement will show or not j=0 k=0 For each item in request.form if (len(Trim(Request.Form(item)))>0 and item<>"Submit22") then fieldname=item fieldnameValue=replace(Request.Form(item),"'","''" ) if j=1 then sql = sql &" AND " end if sql=sql & fieldname &" LIKE '"&trim(fieldnamevalue)&"%' " j=1 k=1 end if Next sql = sql & " order by warrantynumber DESC, custName ASC" %> When I parse the SQL in QueryAnalyzer it is all happy and fun. PLEASE tell me what I am doing wrong... I have been trying to work this out for hours now and there is very little in the way of help on that particular error... I am ever so grateful for you even reading my post, have a great day. |
#2
|
|||
|
|||
I'd echo (or the ASP equivalent) out the sql variable, see what the full query is and see whether that looks right
|
Bookmarks |
«
Previous Topic
|
Next Topic
»
Topic Tools | |
|
|
Similar Topics | ||||
Topic | Topic Starter | Forum | Replies | Last Post |
Error Message related to: Norton Internet Security 2007 Error Message Says: | kota116 | The Anything Else Board | 0 | June 18th, 2007 10:15 PM |
Error message- Run-time error '48': File not found: Psapi.dll | Xeno-Fenix | Windows ME | 4 | January 30th, 2005 08:21 AM |
Error Message: MSScript Control: (Unknown Error) | mebel | Windows ME | 20 | September 14th, 2004 05:19 AM |
Error message: Explorer has caused an error in <unknown> | OSUBuckeye | Windows ME | 2 | September 3rd, 2004 06:40 AM |
Error Message: Error Loading Explorer.exe You Must Reinstall Windows | Suedehead | Windows 98 | 10 | September 21st, 2003 02:37 AM |
All times are GMT +1. The time now is 02:51 AM.