mas gunawan, ini saya coba bantu ya..saya udah gunakan dan berhasil...semoga
bisa membantu anda..
Di Reference tambahkan :
Microsoft SQLDMO object library
di form load tambahkan perintah :
Dim ocn As New SQLDMO.SQLServer
'untuk start sql server
On Error GoTo ens
Dim ocn As New SQLDMO.SQLServer
If ocn.AutoReConnect = False Then
ocn.AutoReConnect = True
Else
ocn.AutoReConnect = False
End If
Dim dsn, pass As String
dsn = frmkoneksi.txtds
pass = frmkoneksi.Text2
ocn.Start False, dsn, "sa", pass
MsgBox "SQL Server Telah Active", vbInformation, "Server Telah Aktive"
Set ocn = Nothing
ens:
If ocn.AutoReConnect = True Then
ocn.AutoReConnect = False
Else
ocn.AutoReConnect = True
End If
MsgBox "SQL Server Telah Active", vbInformation, "Server Telah Aktive"
Set ocn = Nothing
'untuk stop sql server
cn.Execute "SHUTDOWN"
MsgBox "SQL Server Telah Non Active", vbInformation, "Server Telah Non
Active"
Set cn = Nothing
ok.. selamat mencoba ya...GBU
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow