954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

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!?

zizi
Light Poster
40 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

Hello, try using the other driver than MS Access driver. Might be the driver is causing the error.

msaqib
Junior Poster in Training
91 posts since Sep 2004
Reputation Points: 9
Solved Threads: 1
 

the problem is that line 32 should be changed like this:

rsSearch.open sqlstring,objConn,, adLockOptimistic, adCmdText

zizi
Light Poster
40 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You