Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / April 2005



Tip: Looking for answers? Try searching our database.

SQL Adapter will NOT update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Newbie - 26 Apr 2005 17:58 GMT
Please HELP!  I am a total beginner. I have a web application that queries a
sql database and then returns only on row to a dataset.  This row is then
manipulated for an indeterminate amount of time. (this is a work order app)
so I chose to use the dataset to accomplish this.  Problem is that when i
call sqldataadapter.update(MyDataSet) it will only update if i pass it
explixit strings, that is to say:

sqlconnection1.open()
dim strCaseNotes as string = txtbox1.text.tostring()
MyDataSet.Tables(0).Rows(0).Items(7) = strCaseNotes
sqldataadapter1.update(myDataSource)
sqlconnection1.close()

does not work.  in line 3, if i specify  ...Items(7) = "Specific String"
then the data updates...  if not, the data stays the same..

i will provide all the source if needed   PLEASE HELP!!!!!!
Val Mazur (MVP) - 27 Apr 2005 01:15 GMT
Hi,

Are you sure that strCaseNotes variable does not contain exact same value as
in original value of the DataColumn. This is the only explanation I see to
this. Update works pretty good and I do not see any reason that it should
not work in your case

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> Please HELP!  I am a total beginner. I have a web application that queries
> a
[quoted text clipped - 15 lines]
>
> i will provide all the source if needed   PLEASE HELP!!!!!!
Steve Newbie - 27 Apr 2005 05:24 GMT
I think it might be something else... when you program a button to do this
operation in .aspx, (update the database) does the page reload?  If so, how
do you specify for the page not to reload.  I think it might be some of the
code that is in the Page_Onload Sub, otherwise, i agree, update should be
working in this case, (that's what the book says..)

thanks!!

> Hi,
>
[quoted text clipped - 22 lines]
> >
> > i will provide all the source if needed   PLEASE HELP!!!!!!
Val Mazur (MVP) - 28 Apr 2005 02:52 GMT
Hi,

OnLoad event of the pages fires each time when you do postback. In your case
if button causes postback, then page will be reloaded. What you could do to
check Page.IsPostBack property in this event. If this is True, then do not
load data again from the database

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

>I think it might be something else... when you program a button to do this
> operation in .aspx, (update the database) does the page reload?  If so,
[quoted text clipped - 38 lines]
>> >
>> > i will provide all the source if needed   PLEASE HELP!!!!!!
Steve Newbie - 29 Apr 2005 18:04 GMT
Okay, thanks.

If at the end of the sub, if i choose to response.redirect, will this stop
the postback?

I am not entirely sure.

thanks again for the help.

> Hi,
>
[quoted text clipped - 45 lines]
> >> >
> >> > i will provide all the source if needed   PLEASE HELP!!!!!!
Val Mazur (MVP) - 30 Apr 2005 02:55 GMT
It should

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> Okay, thanks.
>
[quoted text clipped - 65 lines]
>> >> >
>> >> > i will provide all the source if needed   PLEASE HELP!!!!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.