Advertisement.

TransHimalaya.in

Everest Helicopter Tour for a day

Book exciting packages at www.transhimalaya.in

sqldatasource listview not updating,inserting mysql data


    listview not updating,inserting mysql data.

Data entered in textboxes is not getting updated in database. In debug mode I see that textbox1 and textbox2 in ItemUpdating event contain the same values as they had before calling ItemUpdating. therefore you are able to populate data in listview using select command but not able to update or insert.

Solution one : have a datakey value for listview property like  DataKeyNames="id"  where id is primary key


solution2 : check the connection string property it shoud be like this



add name="entertrackConnectionString" connectionString="server=191.254.1.xx;User Id=admin;password=xxxx;database=entertrack;Persist Security Info=True; SQLServerMode = true;Allow Zero Datetime=True;"
   providerName="MySql.Data.MySqlClient"

Comments

Most Viewed Post

solution for facebook static.ak.fbcdn.net waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers