Connectionstring
Connectionstring
Is there any way to let the user build a ADO connectionstring when installing?
Re: Connectionstring
PetSo wrote:Is there any way to let the user build a ADO connectionstring when installing?
Yes, quite easily.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Would you mind telling me how?
I can't see any dialog to use to do it.
In Delphi I would do something like this.
I can't see any dialog to use to do it.
In Delphi I would do something like this.
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
str: String;
begin
str := PromptDataSource(0,'');
Label1.Caption := str;
end;
I don't know anything about Delphi, the fact is that you can build an ADO string during installation and save it on a text file, xml file, whatever you want and afterwards read it from your application.
You need Studio version for that (so you can edit dialogs) and some basic scripting on MSICode.

You need Studio version for that (so you can edit dialogs) and some basic scripting on MSICode.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Exactly, so the workflow would be like:
1) Build the user interface so you can query the end-user in an appropriate way,
2) Set your form controls to write to script variables,
3) Initialize those script variables before showing the form with their default values,
4) Use those variables to form the connection string any way you like, and perhaps store that in a new variable,
5) Do anything you like with the connection string!
1) Build the user interface so you can query the end-user in an appropriate way,
2) Set your form controls to write to script variables,
3) Initialize those script variables before showing the form with their default values,
4) Use those variables to form the connection string any way you like, and perhaps store that in a new variable,
5) Do anything you like with the connection string!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I'm sorry I wasn't more specific, since the dialog editor UI seems to be modelled after Delphi I assumed you where familiar with it.
In the oledb interface IDBPromptInitialize there is a function call PromptDataSource that brings up a wizard that lets the user build an ADO connectionstring.
What I wondered was if there was an easy way to access that functionality since it seems to me that it would be something many installations would like to do.
In the oledb interface IDBPromptInitialize there is a function call PromptDataSource that brings up a wizard that lets the user build an ADO connectionstring.
What I wondered was if there was an easy way to access that functionality since it seems to me that it would be something many installations would like to do.
I sort of solved it by making a plug in that design time prompts for the variable that should receive the connection-string and run-time shows the user the connection-string builder wizard.
But it would be nice if you could show the wizard as a response to a button press and present the resulting connection-string in a edit-control.
But it would be nice if you could show the wizard as a response to a button press and present the resulting connection-string in a edit-control.
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
You actually can - see the CD Autorun sample for handling individual button clicks.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Re: Help Plz
CandiceJones wrote:Exactly, so the workflow would be like:
1) Build the user interface so you can query the end-user in an appropriate way,
2) Set your form controls to write to script variables,
3) Initialize those script variables before showing the form with their default values,
4) Use those variables to form the connection string any way you like, and perhaps store that in a new variable,
5) Do anything you like with the connection string!
sorry i don't understand can you explain more
thanks a lot
best regards
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Connectionstring
Dear User,
Because the previous workflow you're referring to seems to be almost clear, probably if you try to describe which is exactly your target, it could help us to assist you.
Regards
Because the previous workflow you're referring to seems to be almost clear, probably if you try to describe which is exactly your target, it could help us to assist you.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 53 guests