Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

Reply

Join Date: Feb 2005
Posts: 14
Reputation: zizi is an unknown quantity at this point 
Solved Threads: 0
zizi's Avatar
zizi zizi is offline Offline
Newbie Poster

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

 
0
  #1
Sep 30th, 2006
hello everybody;

this is my code
<%
Dim sqlstring

dim objConn
  set objConn = server.CreateObject("ADODB.Connection")
  'objConn.ConnectionString ="DSN=ostad.dsn"
  objConn.open("ostad") 
  sqlstring = "SELECT * FROM ostad"

If Request.Form("TypeSearch") = "lname" Then
sqlstring = sqlstring & " WHERE lname LIKE '%"& Request.Form("DaInBox") & "%'"
End If

If Request.Form("TypeSearch") = "skill" Then
sqlstring = sqlstring & " WHERE skill LIKE '%"& Request.Form("DaInBox") & "%'"
End If

If Request.Form("TypeSearch") = "study_paper" Then
sqlstring= sqlstring & " WHERE study_paper LIKE '%"& Request.Form("DaInBox") & "%'"
End If

dim rsSearch
set rsSearch = server.CreateObject("ADODB.Recordset")
line 32rsSearch.open sqlstring,objConn,, adLockOptimistic, adCmdTable

and this is the error i get

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

/asatid/search.asp, line 32

plz help me to fiz it.whats wrong!?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 89
Reputation: msaqib is an unknown quantity at this point 
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

 
0
  #2
Oct 1st, 2006
Hello, try using the other driver than MS Access driver. Might be the driver is causing the error.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 14
Reputation: zizi is an unknown quantity at this point 
Solved Threads: 0
zizi's Avatar
zizi zizi is offline Offline
Newbie Poster

Re: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

 
0
  #3
Oct 3rd, 2006
the problem is that line 32 should be changed like this:

rsSearch.open sqlstring,objConn,, adLockOptimistic, adCmdText
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC