?
Solved

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

Posted on 2008-06-12
7
Medium Priority
?
170 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

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!

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

807 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