Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Code]
- var
- Page0: TInputQueryWizardPage;
- Page1: TInputDirWizardPage;
- // Launch DB CLIP installation
- procedure ButtonOnClick(Sender: TObject);
- var
- Params: string;
- ScriptPath: string;
- ResultCode: Integer;
- DBPath: string;
- Server: String;
- Instance: String;
- SQL_User: String;
- SQL_Password: String;
- begin
- DBPath := Page1.Values[0];
- Server:= Page0.Values[0];
- Instance:= Page0.Values[1];
- SQL_User:= Page0.Values[2];
- SQL_Password:= Page0.Values[3];
- ScriptPath := ExpandConstant('"{app}DBCreate Database 2.12.3.sql"');
- Params := '-v CLIPDATA="'+DBPath+'" CLIPINDEX="'+DBPath+'" CLIPLOG="'+DBPath+'" -S '+Server+''+Instance+' -U '+SQL_User+' -P '+SQL_Password+' -i '+ScriptPath ;
- if MsgBox('' + Params + '', mbInformation, mb_YesNo) = idYes then
- Exec ('sqlcmd',Params, '', SW_SHOW, ewWaitUntilTerminated, ResultCode)
- Exit;
- end;
- procedure InitializeWizard();
- var
- DBButton: TNewButton;
- begin
- Page0 := CreateInputQueryPage(wpInfoAfter,
- 'SQL Informations', '',
- 'Please specify Server and Instance name , then click Next.');
- Page0.Add('Server:', False);
- Page0.Add('Instance:', False);
- Page0.Add('SQL User:', False);
- Page0.Add('SQL Password:', True);
- Page0.Values[0] := ('localhost');
- Page0.Values[1] := ('CLIP');
- Page0.Values[2] := ('sa');
- Page0.Values[3] := ('clip');
- Page1 := CreateInputDirPage(Page0.ID,
- 'Select CLIP Database files Location', '',
- 'CLIP DB data files will be stored in the following folder.'#13#10#13#10 +
- 'To continue, click Next. ' +
- 'If you would like to select a different folder, click Browse.',
- False, 'New Folder');
- Page1.Add('Database Folder');
- Page1.Values[0] := ExpandConstant('{pf}CLIPCLIP_DATADB');
- DBButton := TNewButton.Create(Page1);
- DBButton.Left := ScaleX(16);
- DBButton.Top := ScaleY(205);
- DBButton.Width := ScaleX(100);
- DBButton.Height := ScaleY(25);
- DBButton.Caption := 'Install DB CLIP';
- DBButton.OnClick := @ButtonOnClick;
- DBButton.Parent := Page1.Surface;
- end;
Add Comment
Please, Sign In to add comment