Mert
Posts: 50
Joined: Mon Jun 15, 2009 4:00 pm

Database functions

Hi I am trying to access an SQL database to get data during installation with a C++ dll custom action and I can run the dll but I am not sure about the functions I use inside. I use MsiOpenDatabase function and then MsiDatabaseOpenView function to connect to the component I need but I think it is wrong because I can't get it to work. Should I use SQLGetData function instead or is there any other function for this
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Database functions

Hi,

Please note that the "MsiOpenDatabase" and "MsiDatabaseOpenView" functions are part of the Windows Installer API and they work with the MSI file (it's a database). To work with an SQL database you need to use the ODBC API which has functions like SQLConnect, SQLGetData etc.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”