Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How update a table using a global variable

$
0
0

I'm using gridview to update my table.  I need to get the data from a table field and hold it in a global variable I called HoldKey. I got this part working fine. My problem is when I go to update the table I need to compare the table field against the variable (HoldKey).

For example,

UpdateCommand="UPDATE [PBRM] SET [PBR_LOCT] = @PBR_LOCT WHERE [PBR_LOCT] = HoldkEY ">

The field I need to update is PBR_LOCT where every record that has the old data, held in HoldKey will be updated with the new data.

I'm getting the error

Invalid column name 'HoldkEY'.

Can anyone help me with this?  I'm new to all this.  Thank you


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>