Connectionstring

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

Connectionstring

Postby PetSo » Thu Dec 14, 2006 5:27 am

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

Postby Gizm0 » Thu Dec 14, 2006 9:01 am

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

PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Postby PetSo » Thu Dec 14, 2006 9:29 am

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

Postby Gizm0 » Thu Dec 14, 2006 1:00 pm

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\"

InstallAware Software Corporation

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Thu Dec 14, 2006 1:43 pm

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
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

PetSo
Posts: 6
Joined: Thu Dec 14, 2006 5:22 am
Location: Sweden

Postby PetSo » Fri Dec 15, 2006 3:44 am

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

Postby PetSo » Mon Dec 18, 2006 9:58 am

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:

Postby CandiceJones » Tue Dec 19, 2006 11:00 am

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/

etedali
Posts: 7
Joined: Wed Jan 22, 2014 5:18 am

Re: Help Plz

Postby etedali » Wed Jan 22, 2014 6:30 am

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: 4850
Joined: Sun Aug 22, 2010 4:28 am

Re: Connectionstring

Postby FrancescoT » Wed Jan 22, 2014 12:13 pm

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 Support

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


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 4 guests