Please help....update database

M

mfrey

I really need help, I posted the following question and am still looking for
assistance. I have never posted here before, but if there is somewhere else
or some other website I should post this to get some help, please let me
know, I will post there instead:


Please help!
I have an access database with a form that inputs the info. I created a
results page with the database wizard to show the contents of the database.
I need to be able to update that information. I have followed the microsoft
article 240090 (but I'm working in 2003). I cannot get the query to verify.
I have tried the query this way:
UPDATE Results
SET
cnumber=’::cnumber::’,cname=’::cname::’,ccommon=’::ccommon::’,cstreet=’::cstreet::’,ccity=’::ccity::’,cstate=’::cstate::’,czip=’::czip::’,clocation=’::clocation::’,date1=’::date1::’,cclassification=’::
cclassification::’,ccategory=’::ccategory::’,type1=’::type1::’
WHERE ID=’::ID::’

and it says "Custom Query contains errors" and has a link to this article
http://support.microsoft.com/kb/907307

If I try the query this way:
UPDATE Results
SET
cnumber=’%%cnumber%%’,cname=’%%cname%%’,ccommon=’%%ccommon%%’,cstreet=’%%cstreet%%’,ccity=’%%ccity%%’,cstate=’%%cstate%%’,czip=’%%czip%%’,clocation=’%%clocation%%’,date1=’%%date1%%’,cclassification=’%%
cclassification%%’,ccategory=’%%ccategory%%’,type1=’%%type1%%’
WHERE ID=’%%ID%%’

(I've seen them written both ways)
I get the following error:


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

UPDATE Results SET
cnumber=’%%cnumber%%’,cname=’%%cname%%’,ccommon=’%%ccommon%%’,cstreet=’%%cstreet%%’,ccity=’%%ccity%%’,cstate=’%%cstate%%’,czip=’%%czip%%’,clocation=’%%clocation%%’,date1=’%%date1%%’,cclassification=’%%
cclassification%%’,ccategory=’%%ccategory%%’,type1=’%%type1%%’ WHERE ID=

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
'’%%cnumber%%’'.

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


Please help.....it all works fine as long as I don't use an Update query.
Select query is fine.

Is this the best way to update the results data? And if so, how do I make
it work?? I'm desperate!!!

Thanks,
MD

-----------------------------------------------------------------------------------------
Did you let the wizard also create the Database Editor page and the
Submission Form page??


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.........................with a computer
 
S

Steve Easton

Save yourself a lot of frustration.
Start over and create a new database with the wizard and have the wizard automatically
create the results page, submission page and editor page.
Make sure you click the radio buttons for all 3 when prompted


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
mfrey said:
I really need help, I posted the following question and am still looking for
assistance. I have never posted here before, but if there is somewhere else
or some other website I should post this to get some help, please let me
know, I will post there instead:


Please help!
I have an access database with a form that inputs the info. I created a
results page with the database wizard to show the contents of the database.
I need to be able to update that information. I have followed the microsoft
article 240090 (but I'm working in 2003). I cannot get the query to verify.
I have tried the query this way:
UPDATE Results
SET
cnumber='::cnumber::',cname='::cname::',ccommon='::ccommon::',cstreet='::cstreet::',ccity= '::ccity::',cstate='::cstate::',czip='::czip::',clocation='::clocation::',date1='::date1::'
,cclassification='::
cclassification::',ccategory='::ccategory::',type1='::type1::'
WHERE ID='::ID::'

and it says "Custom Query contains errors" and has a link to this article
http://support.microsoft.com/kb/907307

If I try the query this way:
UPDATE Results
SET
cnumber='%%cnumber%%',cname='%%cname%%',ccommon='%%ccommon%%',cstreet='%%cstreet%%',ccity= '%%ccity%%',cstate='%%cstate%%',czip='%%czip%%',clocation='%%clocation%%',date1='%%date1%%'
,cclassification='%%
cclassification%%',ccategory='%%ccategory%%',type1='%%type1%%'
WHERE ID='%%ID%%'

(I've seen them written both ways)
I get the following error:


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

UPDATE Results SET
cnumber='%%cnumber%%',cname='%%cname%%',ccommon='%%ccommon%%',cstreet='%%cstreet%%',ccity= '%%ccity%%',cstate='%%cstate%%',czip='%%czip%%',clocation='%%clocation%%',date1='%%date1%%'
,cclassification='%%
cclassification%%',ccategory='%%ccategory%%',type1='%%type1%%' WHERE ID=

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
''%%cnumber%%''.

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


Please help.....it all works fine as long as I don't use an Update query.
Select query is fine.

Is this the best way to update the results data? And if so, how do I make
it work?? I'm desperate!!!

Thanks,
MD

-----------------------------------------------------------------------------------------
Did you let the wizard also create the Database Editor page and the
Submission Form page??


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

------------------------------------------------------------------------------------------ ------

I used the database results wizard for the results page and the update page.
I did not use it for the original submission page. But I did use it for this
new update page that doesn't work.
 

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