BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Working with Instances in Delphi (checking if they exist and

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Jason Fischer
Guest





PostPosted: Fri Jun 03, 2005 1:27 am    Post subject: Working with Instances in Delphi (checking if they exist and Reply with 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
Heinrich Braun
Guest





PostPosted: Mon Jun 06, 2005 1:49 pm    Post subject: Re: Working with Instances in Delphi (checking if they exist Reply with 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:
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





PostPosted: Mon Jun 06, 2005 10:34 pm    Post subject: Re: Working with Instances in Delphi (checking if they exist Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.