Incorrect syntax near '*'

M

Mario Krsnic

Hallo zusammen,
I have an app. with SQL-Server. The same page worked fine with Access-DB.
Now I have a problem with this command:

Dim strSQL As String

Dim myConnection As New
SqlConnection("server=mssql07.1und1.de;uid=dbo88888888;pwd=8888888;database=db88888888")

myConnection.Open()

strSQL = "delete * from tbl1 where id =" & n

Dim myCommand As New SqlCommand(strSQL, myConnection)

myCommand.ExecuteNonQuery()

myConnection.Close()

if I try to perform the command I get this message:

Incorrect syntax near '*'

What is the right syntax?
Thank you!
Mario
 
G

Guest

Howdy,

SQL server does not understand * in delete statement.
strSQL = "delete from tbl1 where id =" & n
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top