DSNless ADO-connection using NODBC?

pupricht
Member Posts: 9
In our current environment (Navsion 2.6 C/ODBC / VB6) we use a dsnless ADO-connecten to access NAVISION data.
According to pages 32-35 of my C/ODBC guide ConnectString is something like:
ncs = "Provider=MSDASQL.1;" & _
"Extended Properties=""" & _
"DRIVER={C/ODBC 32 bit};" & _
"CSF=Yes;" & _
"SName=Navision;" & _
"NType=tcp;" & _
"PPath=K:\Navision\client;" & _
"CS=1000;" & _
"OPT=Text;" & _
"IT=a-z,A-Z,0-9,_;" & _
"QTYesNo=No;" & _
"RO=No;" & _
"CC=Yes;" & _
"BE=Yes;" & _
"CD=No;" & _
"CN=VDI/VDE-IT;" & _
"SERVER=N;"
"UID=me;" & _
"PWD=mypwd;" & _
""""
I haven't found any documentation how to establish a dsnless connection using Navision 4.0 and NODBC. Has anyone done this yet?
Peter
According to pages 32-35 of my C/ODBC guide ConnectString is something like:
ncs = "Provider=MSDASQL.1;" & _
"Extended Properties=""" & _
"DRIVER={C/ODBC 32 bit};" & _
"CSF=Yes;" & _
"SName=Navision;" & _
"NType=tcp;" & _
"PPath=K:\Navision\client;" & _
"CS=1000;" & _
"OPT=Text;" & _
"IT=a-z,A-Z,0-9,_;" & _
"QTYesNo=No;" & _
"RO=No;" & _
"CC=Yes;" & _
"BE=Yes;" & _
"CD=No;" & _
"CN=VDI/VDE-IT;" & _
"SERVER=N;"
"UID=me;" & _
"PWD=mypwd;" & _
""""
I haven't found any documentation how to establish a dsnless connection using Navision 4.0 and NODBC. Has anyone done this yet?
Peter
0
Comments
-
I couldn't find anything in the standard documentation.
A couple of things jump to mind though.
First, you don't have a database specified in that string. I'm guessing you just left that out.
Second, the version of the driver is almost certainly different. I'm pretty sure that changed into in both 4.0 and 4.01.
I'll poke around a bit more and see what I can find.
Good question!!0 -
I think what you should do is the following:
set up a user dsn as described in your 4.0 documetation.
verify that you can connect.
find the registry key where the dsn information is stored --
its likely somewhere like this:
HKEY_CURRENT_USER\Software\Odbc\Odbc.ini\Odbc Data sources
but I'm not sure, I haven't done that before
then just coop the information from there into your connection string.
Let me know how that goes!0 -
Thanks for your input....
...it was exactly what was trying for a while (and I tried even harder)without success
In detail:
I set up a DSN called c2
con.ConnectionString = "DSN=c2"
con.Open --->>> works
Looking at the connection after opening the connection just shows:
Provider=MSDASQL.1;Extended Properties="DSN=c2;DBQ=C:\DOKUMEN~1\ADMIN~1\LOKALE~1Temp\;CODEPAGE=1252"
What I tried next was adding the information of the registry (ODBC.INI\c2) step-by-step starting with
ConnectString = "Provider=MSDASQL.1;Extended Properties="""""
then added
"Driver={Microsoft Navision Driver}" (tried c:\.....nodbc.dll instead of symbolic name)
added: "DatabaseName=C:\Programme\Microsoft Business Solutions-Navision\Client\database.fdb;"
"ProgrammFolder=C:\Programme\Gemeinsame
Dateien\Navision\NODBC\;"
"CompanyName=CRONUS AG;"
"DBQ=C:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\;"
"Server=no;"
"ServerName=;"
"CODEPAGE=1252;"
"UserID=vdi;"
"PWD=vde;"
(Tried UID and/or PassWord instaed of UserID and PWD)
con.Open everytime results in a
[Simba][Simba Engine ODBC Driver][DRM File Library] Cannot begin Session0
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