Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 5th, 2004, 06:46 AM
icandothat's Avatar
icandothat icandothat is offline
Super Moderator
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 1,571 icandothat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 7 h 33 m 53 sec
Reputation Power: 3
MS Access odbc_close() Dosn't work

Just a note. If you ever plan to use Access as a database engine for a project, (I know, I know why would you), be aware the command odbc_close() does not work. As a test do this
connect to an Access database through odbc.
run query, get results display results.
call odbc_close()
run another querry on the supposedly closed db.
get the results and display them.

You will see the connection is still alive and leakes memory when your script closes.

Beware..

Reply With Quote
  #2  
Old April 5th, 2004, 10:38 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: MS Access odbc_close() Dosn't work

This has come up before. I think the problem is that odbc_close() fails if there are open transactions for the connection. Use odbc_free_result() on any result resource you have open, and then call odbc_close().

Reply With Quote
  #3  
Old April 7th, 2004, 04:06 PM
icandothat's Avatar
icandothat icandothat is offline
Super Moderator
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 1,571 icandothat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 7 h 33 m 53 sec
Reputation Power: 3
RE: MS Access odbc_close() Dosn't work

I Tried it, dosn't work. Try this
1.open a connection to the db
2.close the connection
(there was no transaction thus no result thus no need for free_result)
3. do a query on the database and get the results

The query will still work. even though the connection should be closed.

Reply With Quote
  #4  
Old April 7th, 2004, 06:45 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: MS Access odbc_close() Dosn't work

I have no idea why that would be failing. Have you tried using odbc_close_all().

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > MS Access odbc_close() Dosn't work


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT