 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jason Fischer Guest
|
Posted: Fri Jun 03, 2005 1:27 am Post subject: Working with Instances in Delphi (checking if they exist and |
|
|
Hi All,
I have an install program that needs to install an instance of MSDE 2000.
I need a good way to test if the instance is already there (a set user name
and password are used to create and access the DB). If it is there, I will
be creating a DB on the instance (no problem with this) but if the instance
is not there then I need to install a new instance and then do the DB
create.
So what I need is a way to test if the instance I want exists, if I can
access it using my set user name and password.
Thanks
|
|
| Back to top |
|
 |
Heinrich Braun Guest
|
Posted: Mon Jun 06, 2005 1:49 pm Post subject: Re: Working with Instances in Delphi (checking if they exist |
|
|
Hi Jason
i could imagine the following steps:
try to connect to msde, if OK create your database,
if not, try to start the server by "net start MSSQLSERVER"
if ok connect to and ... ,
if not ok run MSDE-setup, there is a silent option, check with
'setup.exe /?'
Normally you have to restart windows after MSDE-setup, but it is ok, if
you start the server manually with "net start ..."
There may be smarter ways to check whether a service is registered. One
could be WQL (WMI Query Language ) to check the system.
hth
Heinrich
Jason Fischer schrieb:
| Quote: | Hi All,
I have an install program that needs to install an instance of MSDE 2000.
I need a good way to test if the instance is already there (a set user name
and password are used to create and access the DB). If it is there, I will
be creating a DB on the instance (no problem with this) but if the instance
is not there then I need to install a new instance and then do the DB
create.
So what I need is a way to test if the instance I want exists, if I can
access it using my set user name and password.
Thanks
|
|
|
| Back to top |
|
 |
Jason Fischer Guest
|
Posted: Mon Jun 06, 2005 10:34 pm Post subject: Re: Working with Instances in Delphi (checking if they exist |
|
|
Thanks,
I did something similar to that :)
"Heinrich Braun" <heinrich.braun (AT) homagSPAMM (DOT) de> wrote
| Quote: | Hi Jason
i could imagine the following steps:
try to connect to msde, if OK create your database,
if not, try to start the server by "net start MSSQLSERVER"
if ok connect to and ... ,
if not ok run MSDE-setup, there is a silent option, check with 'setup.exe
/?'
Normally you have to restart windows after MSDE-setup, but it is ok, if
you start the server manually with "net start ..."
There may be smarter ways to check whether a service is registered. One
could be WQL (WMI Query Language ) to check the system.
hth
Heinrich
Jason Fischer schrieb:
Hi All,
I have an install program that needs to install an instance of MSDE 2000.
I need a good way to test if the instance is already there (a set user
name and password are used to create and access the DB). If it is there,
I will be creating a DB on the instance (no problem with this) but if the
instance is not there then I need to install a new instance and then do
the DB create.
So what I need is a way to test if the instance I want exists, if I can
access it using my set user name and password.
Thanks
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|