Sqldatasource updating

I was sitting an a problem last night and couldn't find a solution so I help you can help me now : P I'm using the Insert Comand from the Sql Data Source to write to a Database.

The problem is that the Parameters are always NULL.

The Textbox values come back as empty, which is even stranger. Below is the code for both the Grid View HTML and the C# code behind.

Code (C# On Updating Event) protected void gv Main_Row Updating(object sender, Grid View Update Event Args e) Gridview HTML Code x WHERE (Rec ID = @Rec ID) " Select Command="SELECT Rec ID, Company ID, Region ID, Country ID, Company Code, Company Name, App ID, Country Code, Country Name, Region Company ID, Region, Model Name, Translate Model, Price, Last Updated On, Last Updated By FROM dbo.

event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the Sql Data Source control performs the update operation.

The connection to the underlying data source is not yet open when the event handler delegate is called.

Hi All, i want to use sqldatasource with controlparameters.there are some textboxes and a dropdownlist on my page.i can easily insert and delete records on database table by using these controls as controlparameters by sqldatasource insert() and delete() method but updating fails.i use try catch block to see the error but no errors found.

I have a very simple setup that should work fine per documentation.

because e.cancel is not available in updating event.

I need to do it in UPDATED not in UPDATING because in updating I can't get some events.

Odbc providers associate the parameters in the collection according to the order that the parameters appear in the parameterized SQL query.

For more information about parameterized SQL queries and commands, see Using Parameters with the Sql Data Source Control.

Search for sqldatasource updating:

sqldatasource updating-31sqldatasource updating-41

Hello, I have a Grid View based on a Sql Data Source.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “sqldatasource updating”

  1. They're all on the social life topic, with pieces of advice that work both here on Stranger Meetup and in real life. There is a saying that strangers are friends you just not yet have met.