Update Access DB using Frontpage 2000 returns error

J

Jasonsymr

I have an issue where my query seems to be wrong, however I can't find
any syntax errors.
I am trying to create a page that queries the DB for a matching ID
(which is an autonumber field)
and then update the corresponding fields with new information.

First... Why does the wizard insist on changing % signs to : and does
this matter.

Second is there an issue with using an Autonumber field as a parameter.

When I used OrgName='::OrgName::' as the parameter, I was successful in
updating the database,
however my browser returned no Records found.

Here is the query I am using

UPDATE Results
SET
OrgName='::OrgName::',OrgPhone='::OrgPhone::',OrgAddress='::OrgAddress::'
,OrgCity='::OrgCity::',OrgState='::OrgState::',OrgZipCode='::OrgZipCode::'
,NumberSponsors='::NumberSponsors::',D1='::D1::'

WHERE ID=::ID::

Here is the Error message it gives me.


Server error: Unable to retrieve schema information from the query:

UPDATE Results

SET
OrgName='1',OrgPhone='2',OrgAddress='3',OrgCity='4',OrgState='5',OrgZipCode='6',NumberSponsors='7',D1='8'



WHERE ID=%%ID%%





against a database using the connection string

DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/SubmitBar.mdb.

The following error message comes from the database driver software; it
may appear in a different
language depending on how the driver is configured.
-------------------------------------------------------
[Microsoft][ODBC Microsoft Access Driver] Syntax error in query
expression 'ID=%%ID%%'.

Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147217900 (0x80040e14)
 
F

FlyBoy

Instead of WHERE ID=::ID::, try WHERE ID='::ID::'

Its picky when it comes to the quotation marks.

Hope this helps
 
J

Jasonsymr

I figured it out. I am able to submit to the database when I use this
syntax

WHERE ID= ::ID::

The difference was the space between the = sign and the first :
Thanks FlyBoy
 

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

Top