Link to home
Start Free TrialLog in
Avatar of dgn555
dgn555

asked on

How do I combine 15 ASP Form Fields into 1 database field

I need to validate each character of a 15 character serial number field individually
I was using a hidden field to combine the characters ie  <input type="hidden" name="SerialNumber" id="SerialNumber" value="<%Request.Form("SerialNumber1") & Request.Form("SerialNumber2")%>"> but i am getting a zero output, I think it's a timing issue
Avatar of FER_G
FER_G
Flag of Argentina image

probe this...

value="<%= Request.Form("SerialNumber1") & Request.Form("SerialNumber2") %>

Ferg
Avatar of dgn555
dgn555

ASKER

Sorry a typo, I did not leave the equals sign out in the actual code.

I don't think the problem is syntax the form populatates all the other database fields, just the SerialNumber field is blank .
I really don't understand what are you trying to do, if you try to explain me a little more, i can try to help you...

Regards
Ferg
Saludos.
--
Ing. Fernando D. Giletta
San Fco. Cba. Argentina.

Avatar of dgn555

ASKER

I have a form with 24 fields storing the data to 24 Access database fields using ASP VB.

I now need to modify it so that one form field SerialNumber (curently 15 characters) is entered into the form using 15 separate fields of one character each field i.e. SerialNumber1, SerialNumber2 etc., so I can validate each character separately  then combine them into the original SerialNumber database field.
You don't need to separate the field into 15 fields;
you can simply evaluate it, with "mid" function, that get a substring of any string, like...

texto="clave"
mid(texto,1,1)-> c
mid(texto,2,1)-> l
mid(texto,3,1)-> a
mid(texto,4,1)-> v
mid(texto,5,1)-> e

So, you can validate each character separately

Regards
Ferg
Saludos.
--
Ing. Fernando D. Giletta
San Fco. Cba. Argentina.
Avatar of dgn555

ASKER

Thanks,  but I would prefer to use a separate form field for each of the 15 serial number characters, that way I can use the existing form validator software that will for example validate the first character as alpha characters HYKJS only,  then the second character as numeric only etc.

So could tell me how combine these 15 form field characters in the ASP form then insert into one database field, or should I insert 15 form fields into 15 database fields then combine in Access?
ASKER CERTIFIED SOLUTION
Avatar of dgn555
dgn555

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial