C/ODBC steals one session and never releases it

pmarloz
Member Posts: 10
I'm a user of NF 2.01A. I'm writing a macro in Excel VBA to obtain data from NF through C/ODBC.
To open the database i use the sentence:
The problem is thet when I end execution, the session is not released, causing the rest of the people in the office to become angry
To open the database i use the sentence:
Set gdbODBC = OpenDatabase("", False, dbDriverNoPrompt, "ODBC;DSN=Sample C/ODBC 32 bit;CSF=Yes;SName=XXX;NType=tcp;Database=XXX.fdb;PPath=c:\Archivos de programa\Navision Financials;OPT=Text;IT=a-z,A-Z,0-9,_;QTYesNo=Yes;RO=Yes;CC=Yes;BE=Yes;UID=XXXXX;PWD=XXXX;CN=XXXXXX;SERVER=y;")When I'm done reading data...
gdbODBC.Close SET gdbODBC = NothingWhile the program is running 1 of only 5 sessions of NF is used.
The problem is thet when I end execution, the session is not released, causing the rest of the people in the office to become angry
0
Comments
-
I answer partially to myself.
I have observed that the session is finally released when a exit Excel.
Can anyone figure out how can I release programatically the session without having to exit Excel?0 -
The same happens with MS Access. Even if you close the database and keep MS Access running without any window it still uses a session. It does this so the connection can be reused quickly.
I would use ADO instead, but I am not sure it will help.
Naji ShamanNaji Shaman
http://www.autocloseidle.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions