CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

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

Print topic Send  topic

Author Message
normanchiutan

Posts: 4
Posted: 06/22/2010, 11:04 PM

Hi All,

I just wonder if anyone can help me on this issue. I have been searching for 4 days now and have not found the solution. Any help would be appreciated. I am new to this ASP and I am kind of lost right now. The page that is getting error is the "deleteItems.asp" and using MS Access database which is "siCart.mdb". I am using IIS 7 under Windows 7 Professional 64-bit. Now here is the error in the page:

------ Error Displayed as -----------------------------------------------------

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query expression 'Visitors='5'.
/myEnquiry/deleteItems.asp, line 14

----- "deleteItems.asp" Code -------------------------------------------------

1 <%
2 Dim strVisitorID, strVisitor
3
4 'strVisitor = session("visitorNameFromCookie")
5 'response.write strVisitor
6 strVisitorID = CInt(session("visitorID"))
7 response.write strVisitor
8
9 Set aConn = Server.CreateObject("ADODB.Connection")
10 Set aRt = Server.CreateObject("ADODB.Recordset")
11 'Set an active Connection and select fields from the database
12 aConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/") & "\..\db\siCart.mdb"
13 asql = "DELETE FROM itemEnquired WHERE Visitors='"& strVisitorID
14 aRt.Open asql, aConn
15
16 aConn.Close
17 Set aConn = Nothing
18
19 Response.Redirect "/products/detail.asp?id="&session("DetailID")
20 %>

----------------------------------------------------------------

The session "CInt(session("visitorID"))" is actually a number in the Access database. And I just could not solve it. Anyone with a good and kind heart to help me, would be highly appreciated.

Thank you very much for your time and have a pleasant day!

Cheers,

Norman
View profile  Send private message
mljonzs

Posts: 124
Posted: 06/23/2010, 6:42 AM

You are missing the closing ' around your value....

try this for line 13 above:

asql = "DELETE FROM itemEnquired WHERE Visitors='"& strVisitorID & "'"

_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
normanchiutan

Posts: 4
Posted: 06/27/2010, 11:04 PM

Thanks for the reply. This has been resolved.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.