Solved

MS Access, ASP Error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14', The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation..

Posted on 2003-10-23
8
792 Views
Last Modified: 2012-08-14
Hi,

I am using MS Access for my application. But when the transaction is started then I get the following error message :

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
 
[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

I am using DSN less connection string in ASP page.

I ckecked out everything but it didn't work after changing the name of the variables.

Can someone please help me.

Thanks in advance..

yagya
0
Comment
Question by:yagya_amita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 6

Accepted Solution

by:
Mach1pro earned 75 total points
ID: 9607262
You need to post your connection string
0
 
LVL 2

Expert Comment

by:Smilesxl
ID: 9607283
Need more information.  Would help to see the query code.
0
 

Author Comment

by:yagya_amita
ID: 9610488
Sorry I forgot to put the connection string and the query being used. They are as follows :

set con = server.createobject("ADODB.connection")
    con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq= --my data path"
if mygroup = "Test Mail" then
     con.close
  con.open "Driver={Microsoft Access Driver (*.mdb)};dbq= my data path"
     mysql = "select email from email"
    set rs = con.execute(mysql)
end if
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 6

Expert Comment

by:Mach1pro
ID: 9610579
Try dimming the rs as a recordset

Dim rs
SET rs= Server.CreateObject("ADODB.recordset")
set con = server.createobject("ADODB.connection")
con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq= --my data path"
if mygroup = "Test Mail" then
   con.close
   con.open "Driver={Microsoft Access Driver (*.mdb)};dbq= my data path"
    mysql = "select email.* from email"
   rs.ActiveConnection = con
  rs.Open str, con,1,2
end if
0
 

Author Comment

by:yagya_amita
ID: 9612043
I tried above.But again I am getting the same error message.
0
 
LVL 6

Expert Comment

by:Mach1pro
ID: 9613639
Here is how I am connecting to a database on websites Almost word for word


Dim db
Dim rs
Dim str

db = "driver={Microsoft Access Driver (*.mdb)};dbq= --Data Path--;"
      'OR use this connection string
'db = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= -- Data Path --;"
SET rs= Server.CreateObject("ADODB.recordset")
       
str = "SELECT Email.* FROM Email"      
rs.ActiveConnection = db
rs.Open str, db,1,2
If rs.Recordcount > 0 then
   rs.movefirst
   response.write rs(0)       
End If
rs.Close
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9991017
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Mach1pro {http:#9613639}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question