Hello, I'm having trouble with the following script:
Me.cnAccountingProgram.Close()
Me.cnAccountingProgram.Dispose()
Dim cnMaster As New SqlConnection("Initial Catalog=Master; Data
Source=(local); Integrated Security=SSPI")
Dim cmd1 As New SqlCommand
cnMaster.Open()
cmd1.Connection = cnMaster
cmd1.CommandText = "DROP DATABASE DB_Accounting"
cmd1.ExecuteNonQuery()
cnMaster.Close()
I get a system error?
Can anyone help me?
Thanks,
Rapha?l....
Cor Ligthert - 27 Feb 2005 10:51 GMT
Raphael,
Maybe when you tell us what the first two rows mean, in the rest I see no
problems.
(When you sent next time a message, than don't call it "script" next time
however "code" or even better describe what is the problem in the subject)
Cor
Rapha?l D?salbres - 27 Feb 2005 16:07 GMT
Hello,
The first two row are used to close the current connection, before I drop
the database and restore the backup....
Thanks, anyhow...
Rapha.....
> Raphael,
>
[quoted text clipped - 5 lines]
>
> Cor
Elton Wang - 27 Feb 2005 18:44 GMT
Hi Raphaël,
Not sure. But you can check if the count has enough
permission to drop DATABASE DB_Accounting.
HTH
Elton Wang
elton_wang@hotmail.com
>-----Original Message-----
>Hello, I'm having trouble with the following script:
[quoted text clipped - 18 lines]
>
>.