|
| |
|
|
rikki
Posts: 382 Joined: 4/4/2004 Status: offline
|
Getting query syntax correct - 3/13/2008 12:36:00
I've set up a database result in frontpage, dieted it.. Can't get it work the way I would like.. If I enter the number and password- works. If I enter the Lastname and password - doesn't work (but it should. Any ideas.. fp_sQry="SELECT * FROM BRYSON3A WHERE ((BOOKINGNUMBER = ::BOOKINGNUMBER:: OR LASTNAME = '::LASTNAME::') AND (PASSWORD = '::PASSWORD::'))"
|
|
|
|
ou812
Posts: 1539 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: Getting query syntax correct - 3/13/2008 14:06:39
Hmm, it looks okay. Maybe double check your form name and database name for "lastname" and make sure they're what you have?
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: Getting query syntax correct - 3/13/2008 14:21:27
quote:
fp_sQry="SELECT * FROM BRYSON3A WHERE ((BOOKINGNUMBER = ::BOOKINGNUMBER:: OR LASTNAME = '::LASTNAME::') AND (PASSWORD = '::PASSWORD::'))" I suspect grouping. Try it this way: fp_sQry="SELECT * FROM BRYSON3A WHERE ((BOOKINGNUMBER = ::BOOKINGNUMBER::) OR (LASTNAME = '::LASTNAME::')) AND (PASSWORD = '::PASSWORD::')" See the diff? That help any? EDIT: Either that or there's a space in there. Try a trim statement.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
rikki
Posts: 382 Joined: 4/4/2004 Status: offline
|
RE: Getting query syntax correct - 3/13/2008 16:04:07
I tried that new query; checked spaces.. Same thing.. Error when I use Lastname and password: Database Results Error Description: Extra ) in query expression '((BOOKINGNUMBER = ) OR (LASTNAME = 'tucker')) AND (PASSWORD = 'tucker1')'. Number: -2147217900 (0x80040E14) Source: Microsoft JET Database Engine One or more form fields were empty. You should provide default values for all form fields that are used in the query. One or more form fields were empty. You should provide default values for all form fields that are used in the query.
|
|
|
|
ou812
Posts: 1539 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: Getting query syntax correct - 3/13/2008 16:19:52
Ah, makes sense now. The query isn't working since you don't have a booking number. Not sure how the diet stuff works, but are you able to create your query depending on logic? Or can you default booking number to something, since it won't matter because it is an OR?
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
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
|
|
|