473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Save all values from a form

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
6 1833
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
"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
"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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Pavan Arise | last post by:
Dear all.. I have a picturebox filled on a form. The picturebox has some graphics displayed on it.I was trying to save the picturebox, but continuesly failed to do so. I am clueless of why it is...
4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
7
by: Javaman59 | last post by:
This is about finding the right point at which to save user entered data in the registry, so that when the application is restarted, the saved values will be restored. I want this behaviour to be...
0
by: Robert Love | last post by:
I am trying to save some boolean values from checkboxes using isolated storage. I am able to do strings and integers without a problem but I can't work out how to save boolean values without seeing...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
2
by: rockdc1981 | last post by:
I dont it is possible to put this codes together.. I want to prompt the user to save the record and at the same time have a log of audit trail. the codes work out fine separately. Code for Audit...
4
by: Whasigga | last post by:
Hi I've created a form that has 7 subforms. It is the same subform, bound to a table, just repeated. This form represents a week, and each subform is used to enter in data for each day of the...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
2
by: cleary1981 | last post by:
Hi, I have created a script in PHP thats generates an SVG image. Want I want to do is have PHP save this as example.svg. Can this be done? Heres my code <?php require "config.php"; $proj_id =...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.