Solved

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

Posted on 2008-06-12
7
160 Views
Last Modified: 2010-04-30
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
0
Comment
Question by:dgn555
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:FER_G
ID: 21773937
probe this...

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

Ferg
0
 

Author Comment

by:dgn555
ID: 21774080
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 .
0
 
LVL 7

Expert Comment

by:FER_G
ID: 21778612
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.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dgn555
ID: 21781129
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.
0
 
LVL 7

Expert Comment

by:FER_G
ID: 21781679
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.
0
 

Author Comment

by:dgn555
ID: 21787059
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?
0
 

Accepted Solution

by:
dgn555 earned 0 total points
ID: 21939540
I used JavaScript to combine these 15 fields, works fine, but would have an ASP solution
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question