By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

DSN-less connection for Informix database

P: n/a
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


Apr 20 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Bill Nguyen" <bi*****************@jaco.comwrote in
news:eT**************@TK2MSFTNGP04.phx.gbl:
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.
I believe there is a .NET Infomix driver:

http://www.connectionstrings.com/?carrier=informix

Otherwise you could use the OLEDB driver.

Apr 20 '07 #2

P: n/a
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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
>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


Apr 23 '07 #3

P: n/a
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 comwrote in message
news:Ok**************@TK2MSFTNGP05.phx.gbl...
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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
>>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


Apr 24 '07 #4

P: n/a

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',ConnectOp tion
='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" <bi**********@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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 comwrote in message
news:Ok**************@TK2MSFTNGP05.phx.gbl...
>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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
>>>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



Apr 24 '07 #5

P: n/a
Thanks Jeff;

The trick seemed to work for me. Only that I need to make sure all clients
have the same driver version installed.
Is there a way to find out the ODBC driver version on the client
programmatically?

Bill

"jeff" <jhersey at allnorth dottt comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>
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',ConnectOp tion
='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" <bi**********@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>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 comwrote in message
news:Ok**************@TK2MSFTNGP05.phx.gbl...
>>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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
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



Apr 25 '07 #6

P: n/a

i have not had this issue of versions...however, you could parse the
registry to get this information ... look at

HKEY_LOCAL_MACHINE
SOFTWARE
ODBC
ODBCINST.INI

for each installed ODBC driver you have a key / value combination ...

DriverODBCVer X.XX.XX

You could build (hardcode) a parameter string for each version type ...

Select Case <DriverODBCVer>
Case "3.500.01020.00"
lParameter = "..."
Case "3.501.010203.00"
lParameter = "Version Specific"
Case Else
lParameter = "Default Most Common"
End If

OR you could read the parameter string from a custom settings file ... this
way you can include / accomodate different driver versions without
re-deploying your application.

Create an XML file ...
myODBCConnection.xml ...

<ODBCConnections>
<ConnectionString>
<version>DEFAULT</version>
<parameterstring>...</parameterstring>
<\ConnectionString>
<ConnectionString>
<version>3.5</version>
<parameterstring>...</parameterstring>
<\ConnectionString>
<ConnectionString>
<version>3.6</version>
<parameterstring>...</parameterstring>
<\ConnectionString>
<ConnectionString>
<version>3.7</version>
<parameterstring>...</parameterstring>
<\ConnectionString>
...
<\ODBCConnections>

This way, you can have your application run w/o worries about new driver
versions ... new informix driver, update your XMLfile, send the xml file to
your users. Just make sure the version is the same as the version in the
registry... done.

Jeff

"Bill Nguyen" <bi*****************@jaco.comwrote in message
news:eL**************@TK2MSFTNGP06.phx.gbl...
Thanks Jeff;

The trick seemed to work for me. Only that I need to make sure all clients
have the same driver version installed.
Is there a way to find out the ODBC driver version on the client
programmatically?

Bill

"jeff" <jhersey at allnorth dottt comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>
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',ConnectO ption
='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=MyPasswor d ...

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" <bi**********@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>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 comwrote in message
news:Ok**************@TK2MSFTNGP05.phx.gbl...
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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
>I have this connection string using ODBC DSN
Dim FactorJaco As String =
"dsn=jaco;catalog=factor;uid=user;pwd=passor d"
>
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
>
>
>
>



Apr 25 '07 #7

P: n/a
Jeff;

I did reply to you but the message didn't go thru for some reasons.
I got it working the way you showed me.
Thanks a million

Bill

"jeff" <jhersey at allnorth dottt comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>
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',ConnectOp tion
='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" <bi**********@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>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 comwrote in message
news:Ok**************@TK2MSFTNGP05.phx.gbl...
>>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" <bi*****************@jaco.comwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
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



May 17 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.