Can't create DSN-less connection to Navision SQL

VytekVytek 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 :cry:
"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:
D:\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.
Sign In or Register to comment.