Re: UPDATE using params, again, deosn't work

From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 05/05/04


Date: Tue, 4 May 2004 22:55:44 -0400

Ok, if you are getting one as a value back, something is really really weird
if no update is made Here's the only thing I can think of. Make a Totally
unique record, something with a very distinct value in the column in the
where clause. Then send it through....Verify the Parameter Values
beforehand. If those values are correct and the where clause value is
legit, there's no reason it shouldn't work. I know this is silly, but
verify the database you are writing to as well in the connection string,
make sure you aren't pointing to test and looking at production or some
such. I just mention this b/c this is very weird and it's getting weirder.
Sending an update command is standard far and there's no reason that it
shouldn't work.

Also, did you run the Select statement beforehand? I'm wondering if it's
returning one record like it should be if the where clauses match. And
there's definitely no exceptions beign thrown anywhere right? I'm assuming
that b/c of the records affected but we need to check every avenue.

Don't get discouraged, we'll get it.

Bill
"dazzalondon" <anonymous@discussions.microsoft.com> wrote in message
news:DE2C8846-B4A3-47F1-A428-82D9FC5FED11@microsoft.com...
> ok. its 3.10am; I've been to bed, cannot sleep so attempted to do this for
a 50th time. still doens't work.
>
> I placed a
> intUpdateCount = cmdUPDATE.ExecuteNonQuery()
> con2.Close()
> Label1.Text = intUpdateCount
>
> at the end. and the label returned with a 1; but the record was not
updated.
>
> For your info, i have in the page_load a query which builds the stateEmail
variable, and that sucessfully fills various textboxes I have on the screen.
>
> was the first line correct ?? - i mean the following - because i had an
issue with this yesterday
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
>
> I am very dubious at having to stay up till 3am to try and work something
which has been borhtering me all day. I wouldn't mind if i were making
progress but I am not.