a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query
Page: [1]
 
chadb

 

Posts: 487
From: Kansas
Status: offline

 
[Microsoft][ODBC Microsoft Access Driver] Operation mus... - 11/14/2006 17:31:30   
I am getting this message quite often, my host resets the application, and it works. I think it is too many connections open, or not closing. I have checked my code, seems to be OK. 2 questions, how many connections to an access can be open and not closed, 2nd - is there an easy way to tell how connections are open? These connections are used maybe 10 times a day.

Thanks
Chad
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: [Microsoft][ODBC Microsoft Access Driver] Operation... - 11/14/2006 17:44:35   
Here is some code, maybe it is wrong?
myDSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("..\fpdb\db.mdb")

set MyConn=server.createobject("adodb.connection")
MyConn.open myDSN

(in reply to chadb)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: [Microsoft][ODBC Microsoft Access Driver] Operation... - 11/14/2006 18:04:15   
Use an OLEDB connection like so :

myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\fpdb\db.mdb")

set MyConn=server.createobject("adodb.connection") 
MyConn.open myDSN


All of your pages that access a connection should also close it. The only way is to check your code to ensure there is a

MyConn.close
Set MyConn = nothing





_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to chadb)
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: [Microsoft][ODBC Microsoft Access Driver] Operation... - 11/14/2006 18:07:17   
And I should only be using myconn.open once, right? I am also doing:
str = "SELECT subemail FROM DB where ID =" & ID
Myrs.Open str, Myconn,3,3

Should I also make sure I am closing Myrs?? I have some pages that have multiples of these lines (maybe that is incorrect?) example:

str = "SELECT Name1 FROM DB where ID =" & ID
Myrs.Open str, Myconn,3,3
Name1 = Myrs("Name1")

myRs.close

str = "SELECT user_id FROM DB where ID =" & ID
Myrs.Open str, Myconn,3,3
userID = Myrs("user_id")
myrs.close


(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: [Microsoft][ODBC Microsoft Access Driver] Operation... - 11/14/2006 18:33:42   
Ideally youd create an SQL join to get the record using only one recordset.
You can do it as above, but it can be very inefficient

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to chadb)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts