What Andrey was trying to say is that this group is specifically for the 
discussion of problems and development issues relating to the MySQL 
executables themselves, not how to connect to them. 

Your original question boils down to a basic lack of "clue". There are two 
distinct methods currently at your disposal (more if you needed them) to 
allow a program you write to interact with a MySQL server. One method is 
to use the MySQL API's, the other method is to use the ODBC framework. 
They are separate techniques and separate development "paths" you can 
take.  The APIs do not use the ODBC layer to abstract the database or it's 
functionality, they connect to the server as directly as possible.  The 
ODBC framework (which was probably written using the MySQL APIs) is an 
abstraction of a database, a wrapper. In essence, ODBC is a method of 
making all databases appear nearly the same by creating a common interface 
on one side of a driver and mapping that interface to the specific 
requirements of each database system within the driver itself.

If you want to make an ODBC connection (because you insist, for some 
reason, that you must create and use a DSN) then you need to stay within 
the ODBC framework. All of your function calls need to use only the 
methods and properties exposed to you from the ODBC libraries. However, if 
you want to use the API library  (for its increased speed and efficiency) 
then you must use API methods to make the connection and manipulate data 
(no DSN, no ODBC). These are two separate systems and should not 
intermingle.

Please direct all future programming related questions to the general 
discussion list : [EMAIL PROTECTED]

Respectfully,

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



<[EMAIL PROTECTED]> wrote on 11/05/2004 12:21:54 AM:

> 
> Andrey,
>           I expected the answer, if you know that, help me in that.
> 
> -----Original Message-----
> From: Andrey Hristov [mailto:[EMAIL PROTECTED]
> 
> Sent: Thursday, November 04, 2004 8:00 PM
> To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
> Cc: [EMAIL PROTECTED]
> Subject: Re: Database Connection using DSN
> 
>   Isn't that a question only for the general list. Cross posting is
> not the nicest possible behaviour.
> 
> Andrey
> 
> [EMAIL PROTECTED] wrote:
> >
> 
> >
> 
> > Hi,
> >       I would like to know how to connect to the mysql database using
> a
> > DSN in mysql API's. I am using myodbc 3.51 driver.
> >
> 
> > Used the following API code for the connection
> >
> 
> > MYSQL *link          = mysql_init(NULL);
> > MYSQL *connectHandle =
> > mysql_real_connect(link,"localhost","root","","test",0,NULL,0);
> >
> 
> > But this is not having the option for specifying the DSN or Driver.
> > Please provide me the solution.
> >
> 
> >
> 
> > Thanks,
> > Narasimha
> >
> 
> >
> 
> > Confidentiality Notice
> >
> 
> > The information contained in this electronic message and any
> attachments to this message are intended
> > for the exclusive use of the addressee(s) and may contain confidential
> or privileged information. If
> > you are not the intended recipient, please notify the sender at Wipro
> or [EMAIL PROTECTED] immediately
> > and destroy all copies of this message and any attachments.
> >
> 
> 
> 
> 
> 
> Confidentiality Notice
> 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at 
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
> 
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
> 

Reply via email to