List:MySQL ODBC« Previous MessageNext Message »
From:Peter Carter Date:February 15 2000 10:48pm
Subject:Re: Problems with MyODBC and DSN-less connections in VB 6
View as plain text  
on 2/15/00 4:58 PM, Magnus Hoglund at mho@stripped wrote:

Perhaps one should look at your own code before slamming myodbc. The fact is
that I use DSN'less connections all the time with myodbc and have never had
a problem. Try NOT including the DSN paramiter in your string and set the
property of your connector to not prompt. It is the default to prompt in DAO
and RDO.



> 
> I beleive there is a bug in MyODBC that shows when you try to make a so
> called DSN-less connection from Visual Basic 6. Everything works fine when
> using a predefined data-source (system-DSN). Whenever I try to make a
> DSN-less connection, any of the several ways described in the VB
> documentation, MyODBC pop's up the connection dialog with the field
> "Windows DSN name" empty... I can fill this field with any value and my
> program continues without problems.... This happens even if I define
> option=16 (don't prompt on connect) in the ODBC-connectstring (The
> dialog opens with the checkbox checked)...
> 
> Example: I'm using data-control named Data1
> *********
> Private Sub Form_Load()
> 
> Dim strConnect As String
> 
> strConnect = "ODBC;driver={MySQL};server=mysqlserver;database=db;" & _
> "option=16;uid=user;PWD=pass;DSN=''"
> 
> Data1.Connect = strConnect  ' This will pop up the dialog
> 
> End Sub
> *********
> 
> The "Windows DSN name"-field is empty even if I put DSN=test in the
> connect-string. As far as I understand the ODBC-driver should be able to
> handle an empty DSN-string if all other parameters are correct, something
> MyODBC apparently can't.... This is a problem if you want your program to
> be able to handle logins to the database/source.
> 
> It would be really nice if this problem could be fixed!
> 
> Regards,
> 
> Magnus Hoglund
> Dalarna University
> SWEDEN
> 
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail myodbc-thread1224@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail myodbc-unsubscribe@stripped instead.

Thread
Problems with MyODBC and DSN-less connections in VB 6Magnus Hoglund16 Feb
  • Re: Problems with MyODBC and DSN-less connections in VB 6Peter Carter16 Feb
    • Re: Problems with MyODBC and DSN-less connections in VB 6Magnus Hoglund16 Feb
RE: Problems with MyODBC and DSN-less connections in VB 6Peter Carter16 Feb