?
Solved

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

Posted on 2008-06-12
7
Medium Priority
?
165 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
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

800 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