Can anybody help me, the following code vb6 is working fine in windows 7 32 bit but not working in windows 10 32 or windows 10 64 bit.
My vb6 code for dsn creation for mysql database odbc driver 3.51 is as under :-
Private Declare Function SQLConfigDataSource Lib "ODBCCP32.DLL" (ByVal hwndParent As Integer, ByVal fRequest As Integer,
ByVal lpszDriver As String, ByVal lpszAttributes As String) As Integer
Dim Attr as string
Attr = "SERVER=localhost" & Chr(0)
Attr = Attr & "DSN=ABC" & Chr(0)
Attr = Attr & "DESCRIPTION=DSN For ABC" & Chr(0)
Attr = Attr & "DATABASE=mysqltestdb" & Chr(0)
Attr = Attr & "User=root" & Chr(0)
Attr = Attr & "Password=abctest" & Chr(0)
Attr = Attr & "option=2" & Chr(0)
iReturn = SQLConfigDataSource(0, 1, "MySql ODBC 3.51 Driver", Attr)