Connectionstring

For all your non-technical questions.
Post Reply
PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Connectionstring

Post by PetSo »

Is there any way to let the user build a ADO connectionstring when installing?
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Re: Connectionstring

Post by Gizm0 »

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\"
Install[b]Aware[/b] Software Corporation
PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Post by PetSo »

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.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  str: String;
begin
  str := PromptDataSource(0,'');
  Label1.Caption := str;
end;
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

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. 8)

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\"
Install[b]Aware[/b] Software Corporation
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

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!
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Post by PetSo »

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.
PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Post by PetSo »

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.
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

You actually can - see the CD Autorun sample for handling individual button clicks.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
etedali
Posts: 7
Joined: Wed Jan 22, 2014 5:18 am

Re: Help Plz

Post by etedali »

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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Connectionstring

Post by FrancescoT »

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
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
Post Reply