Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

syntax error in query expression

Participant ,
Jan 29, 2007 Jan 29, 2007

Copy link to clipboard

Copied

I am receiving the following error message:

Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'customerid_cus='.

for the following code:

If IsEmpty(Request.Form("company_cus")) Then

rs_company.Source = "SELECT customerid_cus, company_cus FROM customers_cus WHERE customerid_cus= "& Request.QueryString("customerid") &" "

Else

rs_company.Source = "SELECT customerid_cus, company_cus FROM customers_cus WHERE company_cus = '"& Request.Form("company_cus") &"' "

End If

What could the problem be?
TOPICS
Server side applications

Views

528
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 30, 2007 Jan 30, 2007
Are you sure that you are passing the querystring customerid when the form
company_cus is empty.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"aonefun" <webforumsuser@macromedia.com> wrote in message
news:epmf3n$f3u$1@forums.macromedia.com...
>I am receiving the following error message:
>
> Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
> in
> query expression 'customeri...

Votes

Translate
LEGEND ,
Jan 30, 2007 Jan 30, 2007

Copy link to clipboard

Copied

LATEST
Are you sure that you are passing the querystring customerid when the form
company_cus is empty.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"aonefun" <webforumsuser@macromedia.com> wrote in message
news:epmf3n$f3u$1@forums.macromedia.com...
>I am receiving the following error message:
>
> Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
> in
> query expression 'customerid_cus='.
>
> for the following code:
>
> If IsEmpty(Request.Form("company_cus")) Then
>
> rs_company.Source = "SELECT customerid_cus, company_cus FROM
> customers_cus
> WHERE customerid_cus= "& Request.QueryString("customerid") &" "
>
> Else
>
> rs_company.Source = "SELECT customerid_cus, company_cus FROM
> customers_cus
> WHERE company_cus = '"& Request.Form("company_cus") &"' "
>
> End If
>
> What could the problem be?
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines