
VERY Strange error message!
SQL Server will also accept DELETE without FROM.
Just remember, you're working with Jet. It's about as non-standard as
database platforms get.
--
Toby Herring
Software Architects, Inc.
MCDBA, MCSD
Quote:
> Seems like a stupid mistake doesnt it! I'm used to using Oracle which
doesnt
> require the FROM keyword. I thought SQL was standardised until you get
into
> PL/SQL and the likes. Should've noticed it.
> Thanks though!
> elziko
> > You missing the 'FROM' keyword
> > so it would like this
> > DELETE FROM PROGRAMMEQUEUE WHERE ITEMNUMBER = 10
> > >-----Original Message-----
> > >This is my code that will delete a row from a table in a
> > database (I'm using
> > >the JET Engine):
> > >Dim cmdDelete As New OleDbCommand("DELETE programmequeue
> > WHERE itemnumber =
> > >10", cnNovaPVR)
> > >cnPVR.Open()
> > >cmdDelete.ExecuteNonQuery()
> > >cnPVR.Close()
> > >However this breaks on ExecuteNonQuery with the
> > following error message:
> > >Syntax error (missing operator) in query
> > expression 'programmequeue WHERE
> > >itemnumber = 10'
> > >What on earth happened to the DELETE keyword from my SQL
> > statement? I even
> > >hardcoded the SQL statement (shown here) to prove that
> > IM not loosing it
> > >somewhere.
> > >Whats goign on??? Cheers,
> > >elziko
> > >.