473,405 Members | 2,354 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,405 software developers and data experts.

problems with updating Database

I have tried with the following statements to update a database-table from a
asp page

....
myrow("Telephone") = txtTel.Text
....

But the info dosen't get updated.
Everything else works. I know that since i tried a adding a string to one of
the fields.

myrow("Telephone") = txtTel.Text & "-updated-"

And the "-updated-" showed up in the table.

I realize that someting about the textboxes are wrong.
EnableViewState is set to 'True' for all the textboxes i use.
Nov 18 '05 #1
4 1025
Hi,

EnableViewState is useless for TextBoxes since their value transfer
anyway via page Form. Did you check (with trace) what is the value that
your txtTel send from the client?
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
"Natty Gur" <na***@dao2com.com> wrote in message
news:uN****************@TK2MSFTNGP09.phx.gbl...
Hi,

EnableViewState is useless for TextBoxes since their value transfer
anyway via page Form. Did you check (with trace) what is the value that
your txtTel send from the client?

trace?

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
I found out what was the problem.... *embarrased*

In Page_Load i read in from the Database Table and gave the TextBoxes their
values, but without checking if the textboxes had anything in them from
before,
so whatever the user had typed in the textboxes would be overwritten with
the values from the database. *grin*

Now that i know this; is there any way to check that the page has been
"reloaded".
Right now i chech If txtTelephone.Text.Trim.Lenght > 0, but sometimes the
Textbox will be empty and the page is still beign reloaded.

Does there exist any sort of "Page.hasbeenReloaded" function or something
that will be more appropriate to use?

"Jarod_24" <ja******@hotmail.com> wrote in message
news:f0******************************@news.teranew s.com...
I have tried with the following statements to update a database-table from a asp page

...
myrow("Telephone") = txtTel.Text
...

But the info dosen't get updated.
Everything else works. I know that since i tried a adding a string to one of the fields.

myrow("Telephone") = txtTel.Text & "-updated-"

And the "-updated-" showed up in the table.

I realize that someting about the textboxes are wrong.
EnableViewState is set to 'True' for all the textboxes i use.

Nov 18 '05 #4
Hi again

1) Page.Trace or System.Diagnostics.Debug.Write.
2) IsPostBack should give you indication if the page "hasbeenReloaded".

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
Hello, Sorry to ask what is probably a simple answer, but I am having problems updating a table/database from a PHP/ PHTML file. I can Read From the Table, I can Insert into Table/Database, But...
0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
1
by: David McGeorge | last post by:
Dear Gurus, A Client has the following problems/requests for their Production databases, what is your professional/practical advises to tackle and resolve these issues: 1)Number of...
6
by: George McLean | last post by:
Hello, I am trying to isolate some performance issues. The database is DB2 v8.1 running on a Win2000 server with 4 processors and 1gb of RAM. The application is a GIS application that uses...
0
by: Henry Reardon | last post by:
I need some help with migration. As I mentioned in my previous post, I am having migration problems after updating DB2 7.2 to DB2 8.2 and then applying FP8. I am running on Windows XP. None...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
0
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: gmccammon | last post by:
I'm having problems with my Prepare and Execute statements. I get a syntax error onmy prepare and of course the execute won't run on an undefined value. I don't know what I am overlooking. ...
0
by: Shogun | last post by:
Hey guys, i'm trying to do a confirmation msgbox asking the user if he's sure about updating his database. The problem is... wathever the answer (Yes/No), the database is updated anyway! My code is...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
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 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.