By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

Save all values from a form

P: n/a
Hi,

Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another page
split that memo textfield into the name and their corresponding values
retrieved from the recordset ?

Thanks,

Sanj
Mar 29 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Of course it'd be possible, but why go through the extra process of joining
things together and then split them back up again?

Ray at work

"Sanjay" <we*****@mm.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
Hi,

Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another
page
split that memo textfield into the name and their corresponding values
retrieved from the recordset ?

Thanks,

Sanj

Mar 29 '06 #2

P: n/a
"Sanjay" <we*****@mm.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
Hi,

Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another page split that memo textfield into the name and their corresponding values
retrieved from the recordset ?

This will do (something like) it server-side:

<%
For Each item In Request.Form
memo = memo & item & "=" & Request.Form(item)
Next
%>

But it sounds like you want to do it client-side
to populate another form field; (i.e. <textrea>).
If so, that's a question for another newsgroup.
Mar 29 '06 #3

P: n/a
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:kL********************@comcast.com...
"Sanjay" <we*****@mm.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
Hi,

Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another

page
split that memo textfield into the name and their corresponding values
retrieved from the recordset ?

This will do (something like) it server-side:

<%
For Each item In Request.Form
memo = memo & item & "=" & Request.Form(item)
Next
%>


Below I added "& vbCrLf" to separate each field's name=value pair.

<%
For Each item In Request.Form
memo = memo & item & "==" & Request.Form(item) & vbCrLf
Next
%>
You would then use
item =Split(memo,vbCrLf)
to get each name=value pair then use
what = Split(item,"==")
to get each name and value from an item.

Of course you didn't indicate that you wanted the "name"
of each field just its "value". Adjust accordingly.
Mar 29 '06 #4

P: n/a
Thanks for replying, let me explain the reason for this first:

I have a form (1 form of 8) with approx 60 textfields, I need to save the
values which are returned from various recordsets and calculations using VB
when the page is executed. The user after completing all the forms the user
sets another value on another page (which could be completed a week etc)
which is inserted into a database, so my thought was to save all the values
from the form in a memo textfield in the database instead of creating a field
for each textfield, then after the user has set the other value split the
memo textfield and conduct the extra calculations required based on the
additional set value and resave the all to the database again.

This way I can keep the database small without creating all the fields in
the database for each form - I don't need to report/search on the values in
the memo textfield.

Your solution is perfect so thanks for this, could I ask one question:

e.g.
my memo textfield is like the following using your solution:
productID1==LB5284/3 productID2==6491B710G/Y productID3==KCL10-10

when I retrieve the value from a recordset I would like to using VB to:

productID1 = LB5284/3
productID2 = 6491B710G/Y
productID3 = KCL10-10
I'm trying to follow your split function by using Response.Write:

<%
item = Split(session ("memo"),vbCrLf)
what = Split(item,"==")
Response.Write(what)
%>

Regards,

Sanj

"McKirahan" wrote:
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:kL********************@comcast.com...
"Sanjay" <we*****@mm.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
Hi,

Is it possible to save all the names/values of a form to another memo
textfield before a Insert to the database then when required on another

page
split that memo textfield into the name and their corresponding values
retrieved from the recordset ?

This will do (something like) it server-side:

<%
For Each item In Request.Form
memo = memo & item & "=" & Request.Form(item)
Next
%>


Below I added "& vbCrLf" to separate each field's name=value pair.

<%
For Each item In Request.Form
memo = memo & item & "==" & Request.Form(item) & vbCrLf
Next
%>
You would then use
item =Split(memo,vbCrLf)
to get each name=value pair then use
what = Split(item,"==")
to get each name and value from an item.

Of course you didn't indicate that you wanted the "name"
of each field just its "value". Adjust accordingly.

Mar 29 '06 #5

P: n/a
"sanj" <sa**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Thanks for replying, let me explain the reason for this first:

I have a form (1 form of 8) with approx 60 textfields, I need to save the
values which are returned from various recordsets and calculations using VB when the page is executed. The user after completing all the forms the user sets another value on another page (which could be completed a week etc)
which is inserted into a database, so my thought was to save all the values from the form in a memo textfield in the database instead of creating a field for each textfield, then after the user has set the other value split the
memo textfield and conduct the extra calculations required based on the
additional set value and resave the all to the database again.

This way I can keep the database small without creating all the fields in
the database for each form - I don't need to report/search on the values in the memo textfield.

Your solution is perfect so thanks for this
You're welcome.

, could I ask one question:
e.g.
my memo textfield is like the following using your solution:
productID1==LB5284/3 productID2==6491B710G/Y productID3==KCL10-10

when I retrieve the value from a recordset I would like to using VB to:

productID1 = LB5284/3
productID2 = 6491B710G/Y
productID3 = KCL10-10
I'm trying to follow your split function by using Response.Write:

<%
item = Split(session ("memo"),vbCrLf)
what = Split(item,"==")
Response.Write(what)
%>


Try changing it a little:

<%
what = Replace(Session ("memo"),"=="," = ")
Response.Write("<pre>" & what & "</pre>")
%>
Mar 30 '06 #6

P: n/a
Yes that's great thanks again.

Regards,

Sanj

"McKirahan" wrote:
"sanj" <sa**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Thanks for replying, let me explain the reason for this first:

I have a form (1 form of 8) with approx 60 textfields, I need to save the
values which are returned from various recordsets and calculations using

VB
when the page is executed. The user after completing all the forms the

user
sets another value on another page (which could be completed a week etc)
which is inserted into a database, so my thought was to save all the

values
from the form in a memo textfield in the database instead of creating a

field
for each textfield, then after the user has set the other value split the
memo textfield and conduct the extra calculations required based on the
additional set value and resave the all to the database again.

This way I can keep the database small without creating all the fields in
the database for each form - I don't need to report/search on the values

in
the memo textfield.

Your solution is perfect so thanks for this


You're welcome.

, could I ask one question:

e.g.
my memo textfield is like the following using your solution:
productID1==LB5284/3 productID2==6491B710G/Y productID3==KCL10-10

when I retrieve the value from a recordset I would like to using VB to:

productID1 = LB5284/3
productID2 = 6491B710G/Y
productID3 = KCL10-10
I'm trying to follow your split function by using Response.Write:

<%
item = Split(session ("memo"),vbCrLf)
what = Split(item,"==")
Response.Write(what)
%>


Try changing it a little:

<%
what = Replace(Session ("memo"),"=="," = ")
Response.Write("<pre>" & what & "</pre>")
%>

Mar 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.