Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a numeric parameter in select
Message
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
01472942
Message ID:
01472946
Views:
31
This message has been marked as the solution to the initial question of the thread.
>hi all,
>i have an old site that i developed a while ago in asp. they need some changes done but are not in a position to move to .net. the changes should be simple but i've hit a road block. I have the codes below. I am reading in the job number at the top of the page, it is a numeric value that is passed in as a string and i convert it back in the first line below. this works fine and I can display it on the screen to make sure that it is doing it correctly. further down the page i then want to get the information associated with that job numbers using a simple select but the line is giving me a data mismatch. the job_number is a double and the field is in a vfp table as numeric, i cannot change the data type of the table field. any help much appreciated as google is giving me nothing usable.
>
>
>job_number = CDBL(trim(request("jobno")))
>....
>WHERE CMA_calnum = '"&job_number&"' "
>
>~M

If the field is numeric, why do you add single quote before the number?

Use
>job_number = CDBL(trim(request("jobno")))
>....
WHERE CMA_calnum = " & job_number
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform