>hi All
>how can i guess a sql server is already install on my pc through programatically.
>even i want to start and stop service programatically. if any idea please give me suggestion.
>
>thanks in Advance
>Regards From
>arjun
Well, I found the following
http://www.devx.com/vb2themax/Tip/18459 and I found some code in Sergey's message:
LOCAL oSQL AS "SQLDMO.SQLServer", ;
oDatabase AS "SQLDMO.Database"
oSQL = CREATEOBJECT('SQLDMO.SQLServer')
oSQL.Connect(< server name >, < user name >, < password >)
oDatabase = oSQL.DataBases("pubs")
lcCmd = "DBCC CheckDB"
lcMsg = ""
oDatabase.ExecuteWithResultsAndMessages(lcCmd,, @lcMsg)
If it's not broken, fix it until it is.
My Blog