This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Accessing Databases and doing a new entry
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 22, 2009
07:23 AM
Accessing Databases and doing a new entry
Hi everyone I am trying out the new IS 2010 for my current project.
What I want to do is to access an instance of database on the computer that the program is being installed and get some parameters from the database into a combobox in a dialog then user will make choices and enter some data and then I need to take those data and enter it into the database as a new entry.
Now I know this can be done with a C++ dll scripts but I wanted to know if it can be done with a C# script or is there a feature like this built into IS 2010
What I want to do is to access an instance of database on the computer that the program is being installed and get some parameters from the database into a combobox in a dialog then user will make choices and enter some data and then I need to take those data and enter it into the database as a new entry.
Now I know this can be done with a C++ dll scripts but I wanted to know if it can be done with a C# script or is there a feature like this built into IS 2010
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 22, 2009
10:14 PM
Pascha, you can do this in managed code assemblies. So, you can write in C#, VB.NET, etc. and execute the CLR assembly from a Custom Action within InstallShield. There are sample projects regarding how to do this included in IS2010. Not sure about if this is built-into IS2010 outside of the standard SQL dialogs which allow you to collect basic information like server, userid, password, database etc.
Hope this helps!
Tim
Hope this helps!
Tim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 23, 2009
10:29 AM
Thanks for the reply it was helpful.
So now I am writing the dll for this and I have a problem with the functions. I try the MsiRecordGetString to get the entire data from a column but I can't do it I guess. I used MsiDatabaseOpenView function to open the view and used MsiViewExecute and MsiViewFetch functions before but it's not happening. Should I use SQLGetData function or is it not needed.
So now I am writing the dll for this and I have a problem with the functions. I try the MsiRecordGetString to get the entire data from a column but I can't do it I guess. I used MsiDatabaseOpenView function to open the view and used MsiViewExecute and MsiViewFetch functions before but it's not happening. Should I use SQLGetData function or is it not needed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 23, 2009
11:29 PM
Pascha, I actually use SQL Server Management Objects in VB.NET to take care of the database side of things. I use the InstallShield SQLLogin dialog box to authenticate the user and have them select the server and database. You may have to develop a custom dialog box to get whatever information from the user you are looking for and pass that information as parameters in your Managed Code Custom Action to the assembly you are writing.
Were you able to locate the examples within InstallShield and locate the Managed Custom Actions examples? This is what helped me figure out how to do this.
Tim
😄
Were you able to locate the examples within InstallShield and locate the Managed Custom Actions examples? This is what helped me figure out how to do this.
Tim
😄
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2009
01:26 AM
I am not using VB.NET I am using C++ to make the dll file and as I said above I can't get those functions to work most of the examples I found are in VB.NET so can anyone help me with C++?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2009
06:27 AM
Pascha wrote:
What I want to do is to access an instance of database on the computer that the program is being installed and get some parameters from the database into a combobox in a dialog then user will make choices and enter some data and then I need to take those data and enter it into the database as a new entry.
I see some disambiguation here, especially with regard to your later post about attempts to use MSI functions: do you mean a MSI database, or some external SQL or other type of database? MSI functions are for operations on MSI database. For operations on other type of databases you need appropriate API to use.
By the way - what type of InstallShield project do you use?
Regards,
tene
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2009
06:40 AM
Hmm I want to access an SQL database not an MSI one so for that I can't use MSI functions so what should I use instead?
I am using Basic MSI Project.
I am using Basic MSI Project.