Solved

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

Posted on 2008-06-12
7
154 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
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)

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now