DSNless ADO-connection using NODBC?

puprichtpupricht 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

Comments

  • girish.joshigirish.joshi Member Posts: 407
    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!!
  • girish.joshigirish.joshi Member Posts: 407
    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!
  • puprichtpupricht Member Posts: 9
    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 :D

    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 Session
Sign In or Register to comment.