SQLExpress - Xb2.NET     ot4xb  
   Announcement      Free XUG Meeting Toronto/Canada (May 25, 2008)       [ More Info ... ]
sqlexpress
Re: Installer
Thread Starter: Osvaldo Ramirez Started: 1/12/2007 8:15 PM UTC
Replies: 3
Re: Installer
Dear Boris Borzic

Today I am installing the mysql-odbc, using a batch file, that I download from the link that you told me.

So, I want to ask, or know, If the mysql-odbc is already installed ?
If not, then my pos copy the files and registry on the registry, but without screen or prompt windows ...

Is it posible ?

Best Regards  and thanks in advance
Osvaldo Ramirez



Osvaldo Ramirez <ramirezosvaldo@prodigy.net.mx> wrote in news:6spwvo6tbtu57by.261020061633@ANDREA:
The next week I will "distribuite" my first app that use sql, ( it is > very small ), it use only 2 tables, so I want to make a setup with inno > setup, so, I want to inlclude the ODBC of mysql in that install.
> I think that the odbc is an dll and some additional files, but how to > know where is what are ?
hope this helps:
http://dev.mysql.com/doc/refman/5.0/en/myodbc-installation-binary.html
Best regards,
Boris Borzic
Re: Installer
Osvaldo Ramirez <ramirezosvaldo@prodigy.net.mx> wrote in news:vr6ntdelzw0x62x.160120070032@ANDREA:

This is my function
FUNCTION InstalarMySQLODBC()

Thanks for posting your function, it may be useful for someone.

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools
Re: Installer
Osvaldo Ramirez <ramirezosvaldo@prodigy.net.mx> wrote in news:0hgupcmg2lfkr4l.120120072117@ANDREA:

Today I am installing the mysql-odbc, using a batch file, that I download from the link that you told me.
So, I want to ask, or know, If the mysql-odbc is already installed ?
If not, then my pos copy the files and registry on the registry, but without screen or prompt windows ...
Is it posible ?

Sorry, don't have an answer for you. You will need to experiment with the MySQL installer.

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools
Re: Installer
Dear Boris Borzic

This is my function


FUNCTION InstalarMySQLODBC()
* Begin
  LOCAL cKey , oReg , lInstalled := .F. , cDirMySQL := "\download\MySQL-Install\" , cTarjet := "\windows\system32\"
  cKey := "HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\MySQL ODBC 3.51 Driver"
  oReg := XbpReg():NEW( cKey )
  lInstalled := oReg:Status()
  oReg := NIL
  IF ! lInstalled
    if f_yesno({"Los drives de MySQL ODBC, no estan instalados","Desea instalarlos ?","","Recuerde tener el folder de MySQL ["+cDirMySQL+"]"})
      copyfile( cDirMySQL +"\lib\msvcr71.dll" , cTarjet +"msvcr71.dll" )
      copyfile( cDirMySQL +"\lib\myodbc3S.dll" , cTarjet +"myodbc3S.dll")
      copyfile( cDirMySQL +"\lib\myodbc3S.lib" , cTarjet +"myodbc3S.lib")
      copyfile( cDirMySQL +"\lib\myodbc3.dll"  , cTarjet +"myodbc3.dll" )
      copyfile( cDirMySQL +"\lib\myodbc3.lib"  , cTarjet +"myodbc3.lib" )
      copyfile( cDirMySQL +"\bin\myodbc3i.exe" , cTarjet +"myodbc3i.exe")
      copyfile( cDirMySQL +"\bin\myodbc3m.exe" , cTarjet +"myodbc3m.exe")
      copyfile( cDirMySQL +"\bin\myodbc3c.exe" , cTarjet +"myodbc3c.exe")
      if file(cTarjet+'myodbc3i.exe')
        runshell('-a -d -t"MySQL ODBC 3.51 Driver;DRIVER=myodbc3.dll;SETUP=myodbc3S.dll',cTarjet+'myodbc3i.exe')
        linstalled := .T.
      else
        msgbox("No se pueden instalar los drivers de MySQL ODBC"+"-"+"El archivo myodbc3i.exe, no existe"})
      endif
    endif
  endif
RETURN  lInstalled

HTH
Osvaldo Ramirez