creating ODBC connection programmatically 
Author Message
 creating ODBC connection programmatically

I would like to know how to create a System DSN programatically in VC++
5.0

The program will serve only to create this connection on the machine I
ship it to, the connection being to an Access MDB file - a small console
app would be perfect.

I also want to statically link the program.

any info/code/point in the right direction would be a great help.
thanks,
John.



Mon, 09 Jul 2001 03:00:00 GMT  
 creating ODBC connection programmatically

Hey,

It isn't the cleanest way but...
You could add the appropriate ODBC entries in the registry
for the new DSN.  www.codeguru.com has code for a class that let's
you read/write to the windows registry.

Ron

Quote:

>I would like to know how to create a System DSN programatically in VC++>5.0

>The program will serve only to create this connection on the machine I
>ship it to, the connection being to an Access MDB file - a small console
>app would be perfect.

>I also want to statically link the program.

>any info/code/point in the right direction would be a great help.
>thanks,
>John.

-----------------** -- Posted from CodeGuru -- **-----------------
http://www.codeguru.com/    The website for Visual C++ programmers.


Mon, 09 Jul 2001 03:00:00 GMT  
 creating ODBC connection programmatically

Quote:

> Hey,

> It isn't the cleanest way but...
> You could add the appropriate ODBC entries in the registry
> for the new DSN.  www.codeguru.com has code for a class that let's
> you read/write to the windows registry.

> Ron


> >I would like to know how to create a System DSN programatically in VC++>5.0

> >The program will serve only to create this connection on the machine I
> >ship it to, the connection being to an Access MDB file - a small console
> >app would be perfect.

> >I also want to statically link the program.

> >any info/code/point in the right direction would be a great help.
> >thanks,
> >John.

> -----------------** -- Posted from CodeGuru -- **-----------------
> http://www.codeguru.com/    The website for Visual C++ programmers.

Just #include "odbcinst.h" and call SQLConfigDataSource()


Mon, 09 Jul 2001 03:00:00 GMT  
 creating ODBC connection programmatically
read this article
HOWTO: Configure ODBC Data Sources on the Fly
Last reviewed: July 31, 1997
Article ID: Q110507
http://support.microsoft.com/support/kb/articles/q110/5/70.asp

--
----------------------------------------
Rajesh Parikh
Microsoft Certified Solution Developer

----------------------------------------

Quote:

>I would like to know how to create a System DSN programatically in VC++
>5.0

>The program will serve only to create this connection on the machine I
>ship it to, the connection being to an Access MDB file - a small console
>app would be perfect.

>I also want to statically link the program.

>any info/code/point in the right direction would be a great help.
>thanks,
>John.



Tue, 10 Jul 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Programmatically creating an ODBC Data Source

2. CRecordSet class and ODBC connections - Too many connections

3. connection detection (programmatically)

4. Programmatically enabling connection

5. ODBC file access Programmatically

6. I wish to add a DSN to my 32-bit ODBC List Programmatically

7. Data Source: Programmatically Configuring an ODBC Data Source - HELP PLEASE

8. Data Source: Programmatically Configuring an ODBC Data Source - HELP PLEASE

9. How to install ODBC source programmatically?

10. Data Source: Programmatically Configuring an ODBC Data Source - HELP PLEASE

11. Programmatically configuring ODBC Datasource

12. Programmatically Creating Excel Form and Controls from C#

 

 
Powered by phpBB® Forum Software