PDA

View Full Version : Install MSDE



hammer
01-20-2005, 10:35 AM
I am able to install MSDE, but I need to install my SQL script to create my database and stored procedures. How can I do this?? When I add my SQL Script, it appears that runs before MSDE is installed and even when MSDE is installed, I either have to manually start the service or reboot. Please help!

Amoussou
03-17-2005, 01:35 PM
Hi,
try this bit of code:

if(ServiceExistsService ( szServiceName )) then
ServiceStartService ( szServiceName, szStartServiceArgs );
endif;

Insert it after your MSDE installation or before you run your SQL script

Hope it helps.
Jonathan.

luchezco
12-15-2005, 12:43 PM
First of all you need to create a New Installscript under "Behaviour and Logic -> Installscript"

and replace the content with the green code below

#include "ifx.h"

export prototype StartSQL(HWND);

function StartSQL(hMSI)
begin
ServiceStartService ("MSSQLSERVER","");
ServiceStartService ("SQLSERVERAGENT","");

end;

then you will create a new custom action (Installscript) named "sqlscript" and in the function name combo select startSQL

finally you need to add the script in a specific secuence go to sequences-> installation-> User Interface-> Interface

and select the created custom actions "sqlscript" and locate it before ISSQLServerFilteredList


hope it works...