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
788 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now