|
| |
|
|
DavidO
Posts: 31 Joined: 10/11/2004 Status: offline
|
How do I code a variable in place of the actual number? - 7/10/2007 7:06:30
Error occures when customer id is entered in a form, posted and passed with no data type constraints to my processing page eg;, A123456789 then pulls the record number from the right side by means mConfirmation = MID(mConfirmation, 6, 5) or mConfirmation = Right(mConfirmation, 5) response.write displays the correct number eg:, 56789 "WHERE (((Customers.ID)='mConfirmation')) " The following error occures... [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. The following code work just fine when I insert an actual record number. SQL = "SELECT Customers.ID, Customers.Email, Orders.Accepted " & _ "FROM Customers INNER JOIN Orders ON Customers.ID = Orders.CustomerID " & _ "WHERE (((Customers.ID)=56789))" Set rst = Connect.Execute(SQL) How do I code a variable in place of the actual number? Any and all help appreciated, Thanking you in advance DavidO
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: How do I code a variable in place of the actual num... - 7/10/2007 9:34:38
quote:
"WHERE (((Customers.ID)='mConfirmation')) " How 'bout this: ... mySQL = mySQL & "WHERE (((Customers.ID)=" & mConfirmation & ")) " That help?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
DavidO
Posts: 31 Joined: 10/11/2004 Status: offline
|
RE: How do I code a variable in place of the actual num... - 7/11/2007 13:17:03
That did the trick - working beautiful - Thanks again DavidO
|
|
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
|
|
|