Results 1 to 3 of 3

Thread: [RESOLVED] Deploying / Installing MySQL ODBC Connector with app

  1. #1

    Thread Starter
    Hyperactive Member kxcntry99's Avatar
    Join Date
    Jun 2006
    Location
    Pennsylvania
    Posts
    342

    Resolved [RESOLVED] Deploying / Installing MySQL ODBC Connector with app

    I am hoping someone can help me to get an inno script together that will install the MySQL odbc drivers with my app. I found the script below but it doesn't appear to be working. Does anyone know how this can be accomplished?

    Code:
    ; start odbc files
    Source: c:\windows\system32\myodbc3.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: c:\windows\system32\myodbc3d.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: c:\windows\system32\myodbc3.lib; DestDir: {sys}; flags: onlyifdoesntexist
    Source: c:\windows\system32\my3dsn.hlp; DestDir: {sys}; flags: onlyifdoesntexist
    
    
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    
    [Registry]
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: dword; ValueName: UsageCount; ValueData: $00000001
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\ODBC Drivers; ValueType: string; ValueName: MySQL; ValueData: Installed
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: Driver; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: Setup; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: APILevel; ValueData: 2
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: ConnectFunctions; ValueData: YYN
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: DriverODBCVer; ValueData: 02.50
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: FileUsage; ValueData: 0
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: FileExtns; ValueData: *.txt
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: SQLLevel; ValueData: 1
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\ODBC Data Sources; ValueType: string; ValueName: auctions; ValueData: MySQL
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Driver; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Description; ValueData:
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Database; ValueData: auction
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Server; ValueData: localhost
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: User; ValueData: auction
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Password; ValueData: password
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Port; ValueData:
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Option; ValueData: 0
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Stmt; ValueData:
    Last edited by kxcntry99; Aug 19th, 2008 at 08:23 AM.
    Microsoft Office Integration:Useful Database Links:
    Connection Strings


    Im a pogramar
    Iam a programer
    I’m a programor

    I write code!

  2. #2

    Thread Starter
    Hyperactive Member kxcntry99's Avatar
    Join Date
    Jun 2006
    Location
    Pennsylvania
    Posts
    342

    Re: Installing MySQL ODBC Connector with app

    I changed the script to the following but when I try and call the driver I get the following error:

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

    anyone know what I am missing or how to handle this ?


    Code:
    [Files]
    
    ; start odbc files
    Source: C:\Documents and Settings\browkevi\Desktop\myodbc3.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: C:\Documents and Settings\browkevi\Desktop\myodbc3s.lib; DestDir: {sys}; flags: onlyifdoesntexist
    Source: C:\Documents and Settings\browkevi\Desktop\myodbc3s.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: C:\Documents and Settings\browkevi\Desktop\myodbc3.lib; DestDir: {sys}; flags: onlyifdoesntexist
    Source: C:\Documents and Settings\browkevi\Desktop\myodbc3.hlp; DestDir: {sys}; flags: onlyifdoesntexist
    
    
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    
    [Registry]
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: dword; ValueName: UsageCount; ValueData: $00000001
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\ODBC Drivers; ValueType: string; ValueName: MySQL; ValueData: Installed
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: Driver; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: Setup; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: APILevel; ValueData: 2
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: ConnectFunctions; ValueData: YYN
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: DriverODBCVer; ValueData: 02.50
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: FileUsage; ValueData: 0
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: FileExtns; ValueData: *.txt
    Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\MySQL; ValueType: string; ValueName: SQLLevel; ValueData: 1
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\ODBC Data Sources; ValueType: string; ValueName: auctions; ValueData: MySQL
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Driver; ValueData: {sys}\myodbc3.dll
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Description; ValueData:
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Database; ValueData: auction
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Server; ValueData: localhost
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: User; ValueData: auction
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Password; ValueData: password
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Port; ValueData:
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Option; ValueData: 0
    Root: HKLM; SubKey: Software\ODBC\ODBC.INI\auctions; ValueType: string; ValueName: Stmt; ValueData:
    Microsoft Office Integration:Useful Database Links:
    Connection Strings


    Im a pogramar
    Iam a programer
    I’m a programor

    I write code!

  3. #3

    Thread Starter
    Hyperactive Member kxcntry99's Avatar
    Join Date
    Jun 2006
    Location
    Pennsylvania
    Posts
    342

    Re: Installing MySQL ODBC Connector with app

    Ok I came up with a script that will install the files needed for the driver and run the ODBC registration process. This script seems to work with any build of the MySQL 3.51 connector. I.e. I wrote it for the 3.51.26 version and have tested it with the 2.51.12 and 3.51.16 version.

    Hopefully this will help those that come after me looking to do the same thing.


    Code:
    [Files]
    
    ; start odbc files
    Source: H:\Install_Support\mysql_connector_3.51.16\lib\myodbc3.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: H:\Install_Support\mysql_connector_3.51.16\lib\myodbc3s.lib; DestDir: {sys}; flags: onlyifdoesntexist
    Source: H:\Install_Support\mysql_connector_3.51.16\lib\myodbc3s.dll; DestDir: {sys}; flags: onlyifdoesntexist
    Source: H:\Install_Support\mysql_connector_3.51.16\lib\myodbc3.lib; DestDir: {sys}; flags: onlyifdoesntexist
    
    Source: H:\Install_Support\mysql_connector_3.51.16\bin\myodbc3i.exe; DestDir: {sys}; flags: onlyifdoesntexist
    Source: H:\Install_Support\mysql_connector_3.51.16\bin\myodbc3m.exe; DestDir: {sys}; flags: onlyifdoesntexist
    Source: H:\Install_Support\mysql_connector_3.51.16\bin\myodbc3c.exe; DestDir: {sys}; flags: onlyifdoesntexist
    
    
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    [Run]
    ; run the registration process to add the connector to the ODBC manager
    Filename: "{sys}\myodbc3i"; Parameters:"-a -d -t""MySQL ODBC 3.51 Driver;DRIVER=myodbc3.dll;SETUP=myodbc3s.dll""";
    Microsoft Office Integration:Useful Database Links:
    Connection Strings


    Im a pogramar
    Iam a programer
    I’m a programor

    I write code!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width