ODBC connection

WolterN
Member Posts: 3
Hi All,
We manage a connection with a table inside a Navision 4.0 DB. So far so good. Everything works like a charm until Navision, or the connection with it, goes down for whatever reason.
Our program, written insde a Citect Scada application do not recognize, on-time, when this connection is no longer there.
The internal Citect SQL_Connect act upon a returned handle from the Navision ODBC driver. This handle is given as soon as the first attempt is made to create the connection and contains a positive integer if connected and a -1 when it fails. Now our problem.... it is never a -1 because the ODBC driver seems to return always a positive number!
Of course we can act upon a SQL_Exec error but then it is too late to do a few crucial steps inside the proces.
We now loose important production records because they are simply gone!
Does someone can help me out with this or is there someone who has a listing with the ODBC errornumbers and their meening?
Tech info:
- Navision 4.0 SP2
- Microsoft Navision Driver 4.00.02 22100
- Citect v7.0 release 0
Thanks in advance,
best regards,
Wolter
We manage a connection with a table inside a Navision 4.0 DB. So far so good. Everything works like a charm until Navision, or the connection with it, goes down for whatever reason.
Our program, written insde a Citect Scada application do not recognize, on-time, when this connection is no longer there.
The internal Citect SQL_Connect act upon a returned handle from the Navision ODBC driver. This handle is given as soon as the first attempt is made to create the connection and contains a positive integer if connected and a -1 when it fails. Now our problem.... it is never a -1 because the ODBC driver seems to return always a positive number!
Of course we can act upon a SQL_Exec error but then it is too late to do a few crucial steps inside the proces.
We now loose important production records because they are simply gone!
Does someone can help me out with this or is there someone who has a listing with the ODBC errornumbers and their meening?
Tech info:
- Navision 4.0 SP2
- Microsoft Navision Driver 4.00.02 22100
- Citect v7.0 release 0
Thanks in advance,
best regards,
Wolter
0
Comments
-
WolterN wrote:(...) Now our problem.... it is never a -1 because the ODBC driver seems to return always a positive number!
can you test the ODBC connection outside your development? if so, does it work fine?
and what about create a new table with a few fields, and then use a dataport/xmlport to import/export data to/from Navision?
in universal text mode of course!!
regards_______________
so far, so good0 -
Hi Miguel,
Tnx for your response.
Unfortunately I can't check outside the environment. Of course I could use Excel for a connection with the DSN, but that's not giving me the return handle I need.
A new table with fields is not possible for us. We only read a predefined table with approx. 300 on a daily basis with the basic production parameters and from that moment on the production records we gather via SCADA from the production lines are written into Navision real time. Our application connects as a user to Navision via the ODBC DSN. I can't do anything at all in Navision by myself.
The problem is even worse now because it seems that we must restart our application to be able to SQLConnect again. A SQLDisconnect followed by SQLConnect does not work once we loose the connection.
What I like to know is what others get as a handle if the connection via the ODBC DSN is not functioning.
Best regards,
Wolter0
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