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

 

How do I code a variable in place of the actual number?

 
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 >> How do I code a variable in place of the actual number?
Page: [1]
 
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.

(in reply to DavidO)
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

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> How do I code a variable in place of the actual number?
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