Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a numeric parameter in select
Message
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Divers
Thread ID:
01472942
Message ID:
01472946
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform