Hello!
I have made an application where user can get reading after entering his
name and the name of his partner. I tried to save the names in the database,
in the separate table. My solution:
AccessDataSource1.InsertCommand = "INSERT INTO var(var1) VALUES ('" &
Trim(TextBox1.Text) & "')" 'his name
AccessDataSource1.UpdateCommand = "UPDATE [var] SET [var2] = '" &
Trim(TextBox1.Text) & "' WHERE [id] = (select max(id)from var)" 'her name
and then on the second page:
AccessDataSource1.SelectCommand = "select var1,var2 from var WHERE [id] =
(select max(id)from var)" 'both names
This works fine, when not more users try to work with it at the same time.
Is there better solution for such temporary values? Would it be better to
save this values locally? How to do it?
Thank you
Mario 4 2999
Is this application specific data? If so, put it in the application cache:
cache.insert("partnerName", data)
and retreive it with cache("partnerName")
if it is user specfic data, put it into session state or viewstate:
viewstate.add("partnerName", data)
and retreive with viewstate("partnerName")
"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:eh**********@online.de...
Hello!
I have made an application where user can get reading after entering his
name and the name of his partner. I tried to save the names in the
database, in the separate table. My solution:
AccessDataSource1.InsertCommand = "INSERT INTO var(var1) VALUES ('" &
Trim(TextBox1.Text) & "')" 'his name
AccessDataSource1.UpdateCommand = "UPDATE [var] SET [var2] = '" &
Trim(TextBox1.Text) & "' WHERE [id] = (select max(id)from var)" 'her name
and then on the second page:
AccessDataSource1.SelectCommand = "select var1,var2 from var WHERE [id] =
(select max(id)from var)" 'both names
This works fine, when not more users try to work with it at the same time.
Is there better solution for such temporary values? Would it be better to
save this values locally? How to do it?
Thank you
Mario
Viewstate won't help the second page to retrieve the data from the first
one. Use session variables.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Scott M." <s-***@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
Is this application specific data? If so, put it in the application
cache:
cache.insert("partnerName", data)
and retreive it with cache("partnerName")
if it is user specfic data, put it into session state or viewstate:
viewstate.add("partnerName", data)
and retreive with viewstate("partnerName")
"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:eh**********@online.de...
>Hello! I have made an application where user can get reading after entering his name and the name of his partner. I tried to save the names in the database, in the separate table. My solution: AccessDataSource1.InsertCommand = "INSERT INTO var(var1) VALUES ('" & Trim(TextBox1.Text) & "')" 'his name AccessDataSource1.UpdateCommand = "UPDATE [var] SET [var2] = '" & Trim(TextBox1.Text) & "' WHERE [id] = (select max(id)from var)" 'her name and then on the second page: AccessDataSource1.SelectCommand = "select var1,var2 from var WHERE [id] = (select max(id)from var)" 'both names This works fine, when not more users try to work with it at the same time. Is there better solution for such temporary values? Would it be better to save this values locally? How to do it? Thank you Mario
Thank you!
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgschrie b im
Newsbeitrag news:eb**************@TK2MSFTNGP02.phx.gbl...
Viewstate won't help the second page to retrieve the data from the first
one. Use session variables.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Scott M." <s-***@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
>Is this application specific data? If so, put it in the application cache:
cache.insert("partnerName", data)
and retreive it with cache("partnerName")
if it is user specfic data, put it into session state or viewstate:
viewstate.add("partnerName", data)
and retreive with viewstate("partnerName")
"Mario Krsnic" <pd********@sofortsurf.dewrote in message news:eh**********@online.de...
>>Hello! I have made an application where user can get reading after entering his name and the name of his partner. I tried to save the names in the database, in the separate table. My solution: AccessDataSource1.InsertCommand = "INSERT INTO var(var1) VALUES ('" & Trim(TextBox1.Text) & "')" 'his name AccessDataSource1.UpdateCommand = "UPDATE [var] SET [var2] = '" & Trim(TextBox1.Text) & "' WHERE [id] = (select max(id)from var)" 'her name and then on the second page: AccessDataSource1.SelectCommand = "select var1,var2 from var WHERE [id] = (select max(id)from var)" 'both names This works fine, when not more users try to work with it at the same time. Is there better solution for such temporary values? Would it be better to save this values locally? How to do it? Thank you Mario
But, if this is not a multi-page scenario, ViewState is better because it
takes less server resources. Which is why I offered both as potential
candidates.
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:eb**************@TK2MSFTNGP02.phx.gbl...
Viewstate won't help the second page to retrieve the data from the first
one. Use session variables.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Scott M." <s-***@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
>Is this application specific data? If so, put it in the application cache:
cache.insert("partnerName", data)
and retreive it with cache("partnerName")
if it is user specfic data, put it into session state or viewstate:
viewstate.add("partnerName", data)
and retreive with viewstate("partnerName")
"Mario Krsnic" <pd********@sofortsurf.dewrote in message news:eh**********@online.de...
>>Hello! I have made an application where user can get reading after entering his name and the name of his partner. I tried to save the names in the database, in the separate table. My solution: AccessDataSource1.InsertCommand = "INSERT INTO var(var1) VALUES ('" & Trim(TextBox1.Text) & "')" 'his name AccessDataSource1.UpdateCommand = "UPDATE [var] SET [var2] = '" & Trim(TextBox1.Text) & "' WHERE [id] = (select max(id)from var)" 'her name and then on the second page: AccessDataSource1.SelectCommand = "select var1,var2 from var WHERE [id] = (select max(id)from var)" 'both names This works fine, when not more users try to work with it at the same time. Is there better solution for such temporary values? Would it be better to save this values locally? How to do it? Thank you Mario This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Newbee Adam |
last post by:
how to save textbox values to 2 tables using sqladapter
I am new with this. Do I need to ADO.net?
what is the simplist correct way?
or can I write a query in my vb.net form
insert table...
|
by: poi |
last post by:
I want to detect through code where the ASP.NET temporary files location
is, or where the System TEMP directory is, so I can write temporary
datasets to that location. Normally the user is ASPNET,...
|
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...
|
by: Sanjay |
last post by:
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...
|
by: adnanahmed714 |
last post by:
hi
how could i Save recordset values to txt file using vb
thanks in advance
| |
by: xzzy |
last post by:
1. What asp.net page event would I use to save the values of the controls
just before a page closes?
-- remainder of scenario --
2. close the page and open a different page
3. open a new...
|
by: anandmms |
last post by:
Hello friends,
I am having a table Personal_Detail, and in that table i am having some fields like name, id, phone_number etc... and also with two blob fields photo1, photo2(allow null).
my...
|
by: samgee |
last post by:
Hi.
I'm developing a code where it will store temporary data into gridview from textbox,and the value will have a link to google search.
Now i want to save the values to database,according to...
|
by: Aaron Lawrence |
last post by:
I send emails many times a day. All of the formatting is identical every time, there are just some values that change. Currently I have VB code that, when launched, opens a form where I enter the...
|
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,...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |