PDA

View Full Version : Creating a SQL Server DB & User Login via Install Process


NewsArchive
03-17-2005, 02:27 AM
[Thursday, March 17, 2005 5:30 AM]

This is for the cpTracker Enterprise Edition that uses SQL Server/MSDE.

What's the best method for getting a SQL Server DB and User Login created
during the install process (optionally)? Can this be done via SetupBuilder
or do I have to have it run an app that I create at the end of the install
process? Is there a way to detect were SQL Server is installed (find out
where osql.exe is)?

I know I can include an SQL file and simply tell them to execute it before
running the software.

I am using FM3 and it creates the tables but requires the DB and User Login
to first be created. I want this to be done as automatically as possible in
case the user isn't "SQL Server/MSDE Literate".

In the past I've had a CW app with various install options including
installing MSDE

It gets the user's server name and sa password and then I execute something
like the following via PowerRUN:

'c:\mssql7\binn\osql.exe -S' & GLO:ServerName & ' -Usa -P -i qde30.sql'

To install MSDE (the old 1.x) I did this:

BEEP(BEEP:SystemQuestion) ; YIELD()
Btn#=MESSAGE('Do you really want to install MSDE?', |
'MS Data Engine Installation', ICON:Question, |
BUTTON:Yes+BUTTON:No, BUTTON:Yes, 0)
IF Btn# = BUTTON:Yes
BEEP(BEEP:SystemAsterisk) ; YIELD()
MESSAGE('A status bar is displayed during part of the installation, but
'&|
'the setup will continue for several minutes after the status bar
'&|
'is no longer displayed.'&|
'||To verify MSDE has been completely installed, \MSSQL7 should
have '&|
'been created, there should be a new group on the Start\Programs
menu '&|
'called MSDE and \windows\setup.log should contain a ResultCode
setting '&|
'of 0 and a Completed Status of 1 indicating a successfull
installation.'&|
'||Please reboot the computer after the installation is complete
so '&|
'that the \MSSQL7 folder is added to the PATH.', |
'MS Data Engine Installation Message', ICON:Asterisk)
TIPath=path()
P#=LEN(TIPath)
IF P#>3
IPath=TIPath & '\'
ELSE
IPath=TIPath
END
LOC:MSDECMD = 'msdex86.exe -a -f1 "' & IPath & 'unattend.iss"' !
prefix -s for silent install
RUN(LOC:MSDECMD)
END

Thanks,
Greg Berthume
Berthume Software

NewsArchive
03-18-2005, 02:43 AM
[Thursday, March 17, 2005 4:16 PM]

Greg,

I will have to check this and get back to you!

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 07:45 AM
[Thursday, March 31, 2005 12:21 PM]

Hello Greg..
I understand your query.It looks similar to my issue..You can check the
presence of mssql..by checking the registry . get the regvalue..there is a
feature in the sb5.
In order to find the sql servers installed in the network..You need to write
a DLL(function basically to return the lists of sql servers on the machine
or on the network) .Then in the sb5, have a combobox which gets populated
from the dll..This is how i did..

I wrote an dll and populated the combox box at runtime.

check whether this helps ...and let me know if your are clear enough..

Regards,
Padma