Originally posted by : ray (kyaw_thu@yahoo.com)here is the detail with examplei will have 4 textfields. name as A,B,C and Dlet say i only want to enter the value in A and Bthen i take some value from database(let say it is N) after that i will calculate it like A/N or B/N then i will send that values back to database.Here is the question;1) how can i write the asp code abt taking the value from textfield that ONLY ENTER then begin calculating. I DONT want the textfields that not enter. It seem simple but actually not
Originally posted by : SamWell, The easy way is to find out which fields are entered. Example, user may enter A, C, D.Now, you'll need a few IF statements and depending on the fields the user entered, you just execute the correct statment.Another way (also easy) is to have severalvariables to hold you SQL.Example, sqlA holds PART of the insert statement for variable A, sqlB holds PART of the insert statment for variable B, and so on.Then Depending on what the user entered, you APPEND the corresponding variables to make up the necessay SQL to insert the values.Hope this gives you a head start. 8-)->S.C.
Was this answer helpful ?
Yes No