Hello,
Am trying use command from SQL server on my vb.net by press button.
command
Code:
DBCC DROPCLEANBUFFERS
am getting error
Code:
Private Sub Button168_Click(sender As Object, e As EventArgs) Handles Button168.Click
Dim sql = <sql>
DBCC DROPCLEANBUFFERS
</sql>
Using connection As New SqlConnection("Data Source=ABOAHMED\SQLEXPRESS;Initial Catalog=kankon;Persist Security Info=True;User ID=aboahmed;Password=12345;MultipleActiveResultSets=True"),
command As New SqlCommand(sql.Value, connection)
connection.Open()
command.ExecuteNonQuery()
End Using
End Sub
Wow. You are looking at the error message yourself. You need to post it here so we know what it is. We shouldn't have to guess anything that you already know.
Wow. You are looking at the error message yourself. You need to post it here so we know what it is. We shouldn't have to guess anything that you already know.
sorry did not upload the image,
also am using the second pc the first pc with db
also i add permission db_ddladmin and the db_owner
So this question literally has nothing to do with VB.NET. It's a SQL Server permissions issue so that's what you need to be looking into. Have you checked what permissions are required to execute that command?
So this question literally has nothing to do with VB.NET. It's a SQL Server permissions issue so that's what you need to be looking into. Have you checked what permissions are required to execute that command?
well , its work now just with first pc with db , my second pc not working :\