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
Solved

ASP Access databsae error "Operation was canceled."

Posted on 2003-11-18
13
937 Views
Last Modified: 2007-12-19
I am making a simple ASP script so two people can enter in a couple of fields on info into a very simple access databsae from many locations. I have 8 fields that data is entered into, and passed into an asp script to write to the DB.

i get this error, which i have never seen before

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4E)
Operation was canceled.
/write.asp, line 37

Line 37 of write.asp is,

rs.open asql, "DSN=data"

My "asql" is

asql="INSERT INTO [tblairport] (ode, ort, ddress, hone, ax, ebsite, one, erminals) VALUES ('"&ode&"','"&ort&"','"&ddress&"','"&hone&"','"&ax&"','"&ebsite&"','"&ime_zone&"','"&erminals&"');"

Thank you


0
Comment
Question by:CKudrna
13 Comments
 
LVL 3

Expert Comment

by:evrcool
ID: 9775740
Do you have the ODBC settings correct in the control panel for "data"? Does the connection there test good? Are the drivers the correct drivers? Also, you could try doing a DSNLess connection.
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9775819
CKudrna,
Check your details error at this site :
http://www.aspfaq.com/show.asp?id=2332
0
 

Author Comment

by:CKudrna
ID: 9775865
The database was used successfully in the past, and i changed the tables around for this new simple task i wanted to accomplish. The database name is the same, and the DSN connnection still exists.

I can't find what this error means, anyone really know? Is it a DSN problem or a ASP scripting problem?

The database file is in place correctly as per the DSN entry.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9776026
CKudrna ,
View all the possibility error (0x80040E4E) may arrise based on the article that i shown to you in my first comments.
0
 
LVL 1

Expert Comment

by:devg
ID: 9776087
hi!
Can you first establish the connection object with DSN and try like
rs.open asql, connectionName
0
 

Author Comment

by:CKudrna
ID: 9776089
Yeah it is not in that list, sorry

there is no underscore, and yes, i will use DSN

this connection has worked fine in the past.

increasing points to 300

if anyone can let me know how to fix it without having to be at the server ill give you 500
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9776111
I suggest you use DSN-less connection method rather than DSN method.
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9776154
CKudrna ,
If you prefer use DSN, i would like you to make a simple a select statement to check wheter you can use the DSN method or not(maybe some setting problems?).

asql="select * from tblairport"
rs.open asql, "DSN=data;"

Regards
x_com
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9776167
i think this the mistake :
rs.open asql, "DSN=data;"

Change to
Set objConnection= Server.CreateObject("ADODB.Connection")

objConnection.open "DSN=data;"
rs.open asql, objConnection
0
 

Author Comment

by:CKudrna
ID: 9776255
Changed to
Set objConnection= Server.CreateObject("ADODB.Connection")

objConnection.open "DSN=data;"
rs.open asql, objConnection


Still get the same error

I would like to use DSN because i just want this simple thing working, and i am thousands of miles away form the server, so i can't be setting up other connections remotely

any way i can point to this database file as in (http://domain.com/data.mdb) to edit it?

thanks

increasing the points again
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9776436
CKudrna ,
DSN-less connection is the easiest way to get it work around in asp. less configuration. If you prefer DSN connection, can you state out more details about it? Maybe your problems is different with others?
0
 
LVL 1

Accepted Solution

by:
abnish earned 350 total points
ID: 9777459
Hi CKudrna,
the query you have defined in asql is a insert query, it will not return any recodset thats why you are getting the error. You can do this in following way:

Set objConn = Server.CreateObject("ADODB.Connection")

strConnectionString = "Your connection string"

objConn.Open strConnectionString

objConn.Execute asql

Hope this will work without any error.

If you want to test your connection string then open a standard exe project in VB add a component of "Microsoft ADO 6.0" in your project and add the object in your form, right click on the object and open the property page, click on the "Use Connection String" radio button and click on "Build" command button, provide your DSN name and user id & password (if any) then click on test connection, if it succeed then click on "OK" button you will see the connection string in the text box, use this connection string in your ASP pages.

Happy Programmin!!
Abnish



0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9891002
Ckudrna,
Please read this article too :
http://www.asp101.com/articles/jason/reversedns/default.asp
You may close/refund this thread if you found the solutions
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Auto Submit on dropdown box 3 79
Hide cell in a table 2 27
Executing a script on a timer online 5 20
Adjust an existing ASP Query 45 16
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

840 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