PC Review


Reply
Thread Tools Rate Thread

Another Custom Query Question

 
 
Matt Shudy
Guest
Posts: n/a
 
      8th Jan 2004
Hi,

This is for a different table. I am trying to do a custom
query to update a db table. I get the following error.

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver]
Syntax error (comma) in query expression 'Location='Akron,
Akron' AND Month=1, 1 AND Year=2004, 2004'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Is there something common that i should look for to fix
this problem?

Thanks,

Matt Shudy
 
Reply With Quote
 
 
 
 
Jon Spivey
Guest
Posts: n/a
 
      8th Jan 2004
Hi Matt,
presumably you can see whats wrong with
'Location='Akron, Akron' AND Month=1, 1 AND Year=2004, 2004'.
Can you post up
1/ the form page url (or code)
2/ the custom query you're using

--
Cheers,
Jon
Microsoft MVP - FP

"Matt Shudy" <(E-Mail Removed)> wrote in message
news:0c5301c3d5fc$e6a08420$(E-Mail Removed)...
> Hi,
>
> This is for a different table. I am trying to do a custom
> query to update a db table. I get the following error.
>
> Database Results Error
> Description: [Microsoft][ODBC Microsoft Access Driver]
> Syntax error (comma) in query expression 'Location='Akron,
> Akron' AND Month=1, 1 AND Year=2004, 2004'.
> Number: -2147217900 (0x80040E14)
> Source: Microsoft OLE DB Provider for ODBC Drivers
>
> Is there something common that i should look for to fix
> this problem?
>
> Thanks,
>
> Matt Shudy



 
Reply With Quote
 
Matt Shudy
Guest
Posts: n/a
 
      8th Jan 2004
Hi,

Here is the query:

UPDATE Plans
SET
TIR=::TIR::,LTA=::LTA::,WorkersComp=::WorkersComp::,EHSaudi
t=::EHSaudit::,HazWaste=::HazWaste::,Recycled=::Recycled::,
EHStraining=::EHStraining::,ObservationsConducted=::Observa
tionsConducted::
WHERE Location='::Location::' AND Month=::Month:: AND
Year=::Year::

Every Field is a number field except for location which is
a text field.

Matt Shudy
>-----Original Message-----
>Hi Matt,
>presumably you can see whats wrong with
>'Location='Akron, Akron' AND Month=1, 1 AND Year=2004,

2004'.
>Can you post up
>1/ the form page url (or code)
>2/ the custom query you're using
>
>--
>Cheers,
>Jon
>Microsoft MVP - FP
>
>"Matt Shudy" <(E-Mail Removed)> wrote

in message
>news:0c5301c3d5fc$e6a08420$(E-Mail Removed)...
>> Hi,
>>
>> This is for a different table. I am trying to do a

custom
>> query to update a db table. I get the following error.
>>
>> Database Results Error
>> Description: [Microsoft][ODBC Microsoft Access Driver]
>> Syntax error (comma) in query

expression 'Location='Akron,
>> Akron' AND Month=1, 1 AND Year=2004, 2004'.
>> Number: -2147217900 (0x80040E14)
>> Source: Microsoft OLE DB Provider for ODBC Drivers
>>
>> Is there something common that i should look for to fix
>> this problem?
>>
>> Thanks,
>>
>> Matt Shudy

>
>
>.
>

 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      8th Jan 2004
It looks to me like you've got multiple form fields and/or querystring
parameters with the same name. In HTML, when a form posts with multiple
fields having the same name, the value of "the" field by that name will be a
comma-delimited list of the values of ALL fields having that name.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Matt Shudy" <(E-Mail Removed)> wrote in message
news:0c5301c3d5fc$e6a08420$(E-Mail Removed)...
> Hi,
>
> This is for a different table. I am trying to do a custom
> query to update a db table. I get the following error.
>
> Database Results Error
> Description: [Microsoft][ODBC Microsoft Access Driver]
> Syntax error (comma) in query expression 'Location='Akron,
> Akron' AND Month=1, 1 AND Year=2004, 2004'.
> Number: -2147217900 (0x80040E14)
> Source: Microsoft OLE DB Provider for ODBC Drivers
>
> Is there something common that i should look for to fix
> this problem?
>
> Thanks,
>
> Matt Shudy



 
Reply With Quote
 
Matt Shudy
Guest
Posts: n/a
 
      8th Jan 2004
Thanks for the help, i forgot about some hidden fields i
had put in, and i put in duplicated fields.

Matt Shudy
>-----Original Message-----
>It looks to me like you've got multiple form fields

and/or querystring
>parameters with the same name. In HTML, when a form posts

with multiple
>fields having the same name, the value of "the" field by

that name will be a
>comma-delimited list of the values of ALL fields having

that name.
>
>--
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"Matt Shudy" <(E-Mail Removed)> wrote

in message
>news:0c5301c3d5fc$e6a08420$(E-Mail Removed)...
>> Hi,
>>
>> This is for a different table. I am trying to do a

custom
>> query to update a db table. I get the following error.
>>
>> Database Results Error
>> Description: [Microsoft][ODBC Microsoft Access Driver]
>> Syntax error (comma) in query

expression 'Location='Akron,
>> Akron' AND Month=1, 1 AND Year=2004, 2004'.
>> Number: -2147217900 (0x80040E14)
>> Source: Microsoft OLE DB Provider for ODBC Drivers
>>
>> Is there something common that i should look for to fix
>> this problem?
>>
>> Thanks,
>>
>> Matt Shudy

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query filter question (attempting crosstab query) joave Microsoft Access Reports 2 27th Mar 2009 08:06 PM
Custom Field in Query Slows Query Drastically Larry R Harrison Jr Microsoft Access Queries 1 28th Jan 2005 09:02 PM
Custom color question + smooth chart curves question Gern Blanston Microsoft Excel Charting 2 14th Nov 2003 02:42 AM
Custom color question + smooth chart curves question Gern Blanston Microsoft Excel Misc 1 13th Nov 2003 01:02 PM
Question: Invoking custom file type (file associated with custom app) VB Programmer Microsoft ASP .NET 1 3rd Nov 2003 11:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:15 AM.