Re: DSN-less connection for Informix database




no, build an odbc for using the specificed driver ... my case in this
example ... Pervasive ODBC client Interface ... I know every user's machine
will have this DRIVER installed. But what I do not want to rely on is
having to SETUP an odbc connection profile .. dsn ... for each user or for
each machine.

So, what I did was created an ODBC System DSN ... opened the Regedit ...
navigate to ...
HKEY_LOCAL_MACHINE
SOFTWARE
ODBC
ODBC.INI

Find the DSN profile I just created...
Look at the KEY and VALUE list...
Dup this in the parameter string you see below..

For example, here is one that will connect to an access database ... ODBC
....

'Driver={Microsoft Access Driver
(*.mdb)};UID=admin;PWD=;DBQ=C:\Test.MDB',ConnectOption
='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT;'

I assumed you question was how to use an ODBC driver to connect to a
database without needing a User or System DSN profile. Is this correct.

If so, the above should work for you ... building your connection string.

Does this help?

If you are useing Informix ... and your DSN is jeco ...

Dim FactorJaco As String = "dsn=jaco;catalog=factor;uid=user;pwd=passord"

in your connection string, replace the DNS=jaco ... with a string you build
using the information you get from the registry entry.

the example I gave you, was for a PERVASIVE dsn'less connection string ...
instead of me using a NAMED dsn connection profile ...

DNS='myDNSProfile';uid=MyUserName;pwd=MyPassword ...

I use ...

Driver={Pervasive ODBC Client Interface}; ServerDSN=purchasingdata;
ServerName=10.10.10.7.1583; TCPPort=1583; TransportHint=TCP:SPX ;
uid=MyUserName'pwd=MyPassword

If I look at myDSNProfile in the ODBC.ini section of the registry, they will
be the following keys...
ServerDSN=purchasingData
ServerName=10.10.10.7.1583
....
all the information that is required by the Pervasive ODBC Client Interface
driver ...
....
remember, the registry only contains parameter / value lists for the
driver, nothing else. So, if you can duplicate the parameter string, you do
not need to rely on a predefined DSN. I can not give you the specific
connection string for you INFORMIX connection becuase I do not have your
driver loaded on my machine - which would allow me to create a dns profile,
and review the parameters in the registry.


Jeff

"Bill Nguyen" <billn_nospam@xxxxxxxx> wrote in message
news:%236oCX4hhHHA.2332@xxxxxxxxxxxxxxxxxxxxxxx
Jeff;

Where do you go to get this info in the registry?
Are you talking about ODBC for Informix database?

Thanks

Bill

"jeff" <jhersey at allnorth dottt com> wrote in message
news:OkT5vkahHHA.4296@xxxxxxxxxxxxxxxxxxxxxxx
To create dsn'less ODBC connections, I create a DSN on my machine and
look at the registry to see what data elements it creates, I then simply
create a connection string. FOr example, here is on I use to connect
Timberline Software - P/O system.

Driver={Pervasive ODBC Client Interface}; ServerDSN=purchasingdata;
ServerName=10.10.10.7.1583; TCPPort=1583; TransportHint=TCP:SPX

I then add all the other connection data to it - user name, password and
so on. This string above replaces the need for me to create a DSN
connection profile on each client machine or on the citrix server.

Jeff.




"Bill Nguyen" <billn_nospam_please@xxxxxxxx> wrote in message
news:eT0MI24gHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
I have this connection string using ODBC DSN
Dim FactorJaco As String =
"dsn=jaco;catalog=factor;uid=user;pwd=passord"

This requires an ODBC DSN (jaco) at every client PC. I need to use
DSN-less connection for terminal server setup.

Any help is greatly appreciated.



Bill









.



Relevant Pages

  • Re: ADODB.Connection object not returning correct ConnectonString prop
    ... Opens the connection (successfully) ... I'm not positive but a guess is that ADO is using the MSDASQL Provider to ... provide OLE DB support for ODBC. ... ODBC Driver. ...
    (microsoft.public.data.ado)
  • Re: DSN-less connection for Informix database
    ... registry to get this information ... ... for each installed ODBC driver you have a key / value combination ... ... on is having to SETUP an odbc connection profile .. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Clipper and ADO
    ... It'll be the ODBC driver. ... Look for the ODBC Admin icon in control panel. ... directory specified in the connection string but the above MS link should ...
    (microsoft.public.vb.general.discussion)
  • Re: DSN-less connection for Informix database
    ... Pervasive ODBC client Interface ... ... on is having to SETUP an odbc connection profile .. ... what I did was created an ODBC System DSN ... ... in your connection string, replace the DNS=jaco ... ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DSN-less connection for Informix database
    ... Is there a way to find out the ODBC driver version on the client ... on is having to SETUP an odbc connection profile .. ... in your connection string, replace the DNS=jaco ... ...
    (microsoft.public.dotnet.languages.vb)