navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

ASP Database Search question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> ASP Database Search question
Page: [1]
 
3dfxgamer

 

Posts: 2
Joined: 10/26/2004
Status: offline

 
ASP Database Search question - 10/26/2004 12:09:27   
First off let me describe the problem i have a form built with two drop down boxes. These boxes contain a region and a profession. The for sends the choices my table page that searches on the choices and outputs a table displaying the needed information.

At this point this is what I get.

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'reg = Central Arkansas and prof = CPA'.

/sim_table.asp, line 56


Here is the input site you can see what happens.

http://development.atu.edu/sim_input.asp

The query expression is this
sql = "select * from shows where reg = " & u_where & " and prof = "& u_search & ""

I imagine that the error is in my sql string. I have looked at this too long to see it now.
I appreciate any help thanks.
ou812

 

Posts: 1587
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: ASP Database Search question - 10/26/2004 12:39:40   
It looks like you just need some quotes around your variables:

sql = "select * from shows where reg = ' " & u_where & " ' and prof = ' "& u_search & " ' "

-brian

(in reply to 3dfxgamer)
3dfxgamer

 

Posts: 2
Joined: 10/26/2004
Status: offline

 
RE: ASP Database Search question - 10/26/2004 15:33:51   
That did it thanks a lot.

(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> ASP Database Search question
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts