SQL Error
am 01.10.2007 22:59:07 von J-P-W
Hi,
My ASP page is accessed from a form, the aim is to update a record.
The SQL generated is:
UPDATE tblSales SET ItemDescription='Seven',
ItemBriefDescription='Sev', ItemCost=0, ItemPhotoURL='', Current='No'
WHERE ItemID=7;
On the web server I get an error "Syntax error in UPDATE statement."
I've used the same sql string in access - no error.
I've used Jeff Key's Access Query Analyzer and get an error.....
But I can't spot the error - can you? [please]
Thanks
Jon
Re: SQL Error
am 01.10.2007 23:12:46 von reb01501
J-P-W wrote:
> Hi,
>
> My ASP page is accessed from a form, the aim is to update a record.
>
> The SQL generated is:
>
> UPDATE tblSales SET ItemDescription='Seven',
> ItemBriefDescription='Sev', ItemCost=0, ItemPhotoURL='', Current='No'
> WHERE ItemID=7;
>
> On the web server I get an error "Syntax error in UPDATE statement."
>
> I've used the same sql string in access - no error.
> I've used Jeff Key's Access Query Analyzer and get an error.....
>
Perhaps a reserved keyword? My guess would be Current. Try surrounding
it with brackets []
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: SQL Error
am 02.10.2007 10:41:55 von J-P-W
On 1 Oct, 22:12, "Bob Barrows [MVP]" wrote:
> J-P-W wrote:
> > Hi,
>
> > My ASP page is accessed from a form, the aim is to update a record.
>
> > The SQL generated is:
>
> > UPDATE tblSales SET ItemDescription='Seven',
> > ItemBriefDescription='Sev', ItemCost=0, ItemPhotoURL='', Current='No'
> > WHERE ItemID=7;
>
> > On the web server I get an error "Syntax error in UPDATE statement."
>
> > I've used the same sql string in access - no error.
> > I've used Jeff Key's Access Query Analyzer and get an error.....
>
> Perhaps a reserved keyword? My guess would be Current. Try surrounding
> it with brackets []
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.- Hide quoted text -
>
> - Show quoted text -
Thanks Bob, as my head hit the pillow (sad!!!) I wondered the same
thing - you're right.
Regards
Jon