Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
hidden fields to insert into table
Old 04-02-2006, 10:26 PM hidden fields to insert into table
Junior Talker

Posts: 2
Trades: 0
Hi, i'm wondering how i can set hidden form fields to an array from a record set, this is what i have so far, am i on the right track?

Code:
 
For i = 0 To UBound(garrResult, 2)
    mycount=mycount+1
<input type="hidden" name="ID" value="<% = garrMember(0, i) %>">
<input type="hidden" name="LastName" value="<% = garrMember(1, i) %>">
<input type="hidden" name="FirstName" value="<% = garrMember(2, i) %>">
<input type="hidden" name="Email" value="<% = garrMember(3, i) %>">
<input type="hidden" name="Fax" value="<% = garrMember(4, i) %>">
<input type="hidden" name="Province" value="<% = garrMember(5, i) %>">
<input type="hidden" name="RegistrationURL" value="<% = garrMember(9, i) %>">
<input type="hidden" name="UnsubscribeURL" value="<% = garrMember(10, i) %>">
<input type="hidden" name="AccessCode" value="<% = garrMember(11, i) %>">
<input type="hidden" name="Specialty" value="<% = garrMember(8, i) %>">
<input type="hidden" name="Profession" value="<% = garrMember(13, i) %>">
<input type="hidden" name="SurveyName" value="<% = gstrSessionSurveyName %>">
<input type="hidden" name="SurveyID" value="<% = gstrSessionSurveyID %>">
Next
and i'm also wonder how i can insert these records into a table uning insert, statically i would use this:
Code:
 
strSql = "INSERT INTO recruitmentLists (SurveyID, SurveyName, ID, LastName, FirstName, Email, Fax, Province, RegistrationURL, UnsubscribeURL, AccessCode, Specialty, Profession, creator, creatorDate) VALUES ('"&Request.Form("SurveyID")&"','"&Request.Form("SurveyName")&"','"&Request.Form("ID")&"','"&Request.Form("LastName")&"','"&Request.Form("FirstName")&"','"&Request.Form("Email")&"','"&Request.Form("Fax")&"','"&Request.Form("Province")&"','"&Request.Form("RegistrationURL")&"','"&Request.Form("UnsubscribeURL")&"','"&Request.Form("AccessCode")&"','"&Request.Form("Specialty")&"','"&Request.Form("Profession")&"','"&Session("uzor")&"',GetDate())"
havey is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-03-2006, 10:02 AM Re: hidden fields to insert into table
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
is garrResult the output from getRows() ? if so it looks right

for the insert if any fields are numeric you will need to typecast the request.form item as it will be a string type otherwise.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to hidden fields to insert into table
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15571 seconds with 12 queries