C/ODBC steals one session and never releases it

pmarlozpmarloz Member Posts: 10
edited 2004-07-09 in Navision Financials
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:
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 = Nothing
While 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

Comments

  • pmarlozpmarloz Member Posts: 10
    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?
  • aciaci Member Posts: 41
    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 Shaman
Sign In or Register to comment.