Can't create DSN-less connection to Navision SQL
Vytek
Member Posts: 4
Is it possible to create DSN-less conection to Navision SQL database?
I have created User DSN named Navision and set up Navision ODBC
- it works fine,i can access navision tables through ms excel and etc.
Now i'm trying to make DSN-less connection and have no success
"Invalid Session handle." This is my connection-string:
dsn="DRIVER={Microsoft Navision Driver};UID=abc;PWD=123;
SName=navisiontest;NType=tcp;CSF=Yes;SERVER=Yes;
RD=No;CD=No;BE=Yes;CC=Yes;RO=No;QTYesNo=Yes;
IT=All Except DOT;OPT=Text;"
This script i run to make a connection:
set dbNav = createobject("ADODB.Connection")
Wscript.echo dsn
'on error resume next
dbNav.open dsn
If Err <> 0 Then
tn = Err.Number & " -- " & Err.Description
else
tn = ""
Wscript.echo "Connected!"
end if
on error goto 0
If tn <> "" Then
Wscript.echo "No good" & VbCrLf & tn
WScript.Quit
End If
This is error i get:
\script.vbs(14, 1) Microsoft OLE DB Provider for ODBC Drivers:
[Simba][SimbaEngine ODBC Driver][DRM File Library]Invalid Session handle.
But when i use DSN in connection string "DSN=Navision;" it works,
i get msg. "Connected!".
What does error "Invalid Session handle." means?
Do i miss any conection string parameters/attributes?
Thank you in advance.
I have created User DSN named Navision and set up Navision ODBC
- it works fine,i can access navision tables through ms excel and etc.
Now i'm trying to make DSN-less connection and have no success
"Invalid Session handle." This is my connection-string:
dsn="DRIVER={Microsoft Navision Driver};UID=abc;PWD=123;
SName=navisiontest;NType=tcp;CSF=Yes;SERVER=Yes;
RD=No;CD=No;BE=Yes;CC=Yes;RO=No;QTYesNo=Yes;
IT=All Except DOT;OPT=Text;"
This script i run to make a connection:
set dbNav = createobject("ADODB.Connection")
Wscript.echo dsn
'on error resume next
dbNav.open dsn
If Err <> 0 Then
tn = Err.Number & " -- " & Err.Description
else
tn = ""
Wscript.echo "Connected!"
end if
on error goto 0
If tn <> "" Then
Wscript.echo "No good" & VbCrLf & tn
WScript.Quit
End If
This is error i get:
[Simba][SimbaEngine ODBC Driver][DRM File Library]Invalid Session handle.
But when i use DSN in connection string "DSN=Navision;" it works,
i get msg. "Connected!".
What does error "Invalid Session handle." means?
Do i miss any conection string parameters/attributes?
Thank you in advance.
0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions