Updating Gridview with SqlDataSource with MySQL

Hey guys,

Got one problem thats really making me tear out my hair. i know this may be simple for you guys, but its completely got me stumped.. i'm really appreciate f this forum and the users who helped me in the past, it really has helped me out in tight situations. Big Smile

Here's the problem, i have a populated gridview that has a single column (UserStatus) that i want to editable, the edit and cancel buttons both work, but i can't seem to update the single record that i updated without the whole column in the gridview getting updated to the same value that i put into the single one.. i hope i'm making this clear.. been trying the whole night to get this to work but still no luck.. any help to point me in the right direction is very very much appreciated.

thank you Big Smile

 
Silly me, forgot to put in that i'm using MySql 5 with the .Net Connector 5.1.2.. thanks again Big Smile
 

0
specnyt
9/3/2007 12:39:40 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
665 Views

Similar Articles

[PageSpeed] 30

Hi:

specnyt:
but i can't seem to update the single record that i updated without the whole column in the gridview getting updated to the same value that i put into the single one..

  What do you mean by this? Could you please post your current code?

Thanks


Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Allen
9/5/2007 2:50:15 AM
Reply:

Similar Artilces:

GridView-Mysql-bind Gridview control to SqlDataSource -problem-Delete Command
 DeleteCommand="DELETE FROM relatorios WHERE codigo=codigo"> this works but delete everythingi have tryed thisWHERE codigo='codigo' ">and WHERE codigo=?codigo"> sintax error on mysql the full code is below :  <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" CellPadding="4" DataKeyNames="codigo"  AutoGenerateDeleteButton="True"  DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="Non...

Calendar Control in the EditItemTemplate of a Gridview
 I have a calendar control nested inside a gridview template item. This control works when I use it to read the data which comes from my SQL data source control. But when I try to commit changes with the update event the selectedvalue of the gridview control which is passed back to the update query doesn’t contain the parameter for the date.   I have proved this with SQL profiler. My stored procedure call is passed like this: exec uLegalContract @contractstatus = N'H', @expirydate = NULL, @document = NULL, @invoicedate = NULL, @cap = NULL, @notes = NULL, @...

Issue with getting values from child controls in a gridview, to use for the update using a SQLDataSource control
Hi all, I have a gridview bound with a SQLDataSource. I am using the Update feature of the SQLDataSource to update a SQL Server database with values entered into the gridview. However I am not getting it to work. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview. I have been using the names of the actual controls but nothing happens. Upon submit, the screen returns blank, and the database is not updated. Here is some code:   <asp:GridView ID="GridEditSettlement" runat="server" AutoGenerate...

SqlDataSource Control and Gridview control
Hi, I'm new to web development and learning about these controls.  The books teach you to bind the gridview control to an sqldatasource to perform delete,update,insert functions as well as to list the records in a table.  Is this standard practice for real world applications?  Or is there another way that should be used to display/manage table data in the gridview control? Thanks. Tulsi Using a sqldatasource is the best way I know of for binding data to a gridview.  (I'm pretty new to web development too, so maybe someone else can chime in if they know someth...

problem making sql-update command with gridview control through a sqldatasource
For some reason this code does not update the requested sql-table on my db-server. nothing wrong with the select command, works fine. any ideas? someone? ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <asp:GridView ID="GridView1" runat="server" DataKeyNames="datetimeint" AutoGenerateEditButton="true" AllowSorting="true" AllowPaging="true" DataSourceID="SqlDataSource2" OnSelected...

Update and Delete rows from gridview control with sqldatasource HELP HELP
Hello all, I am really lost about this part. I have a gridview control to represent the data from sql server 2005. and i want to update and delete some of the rows. But i have got problem to do so. when i update the row, the data remains the same as before after i click the update button. Even worse, when i click the delete button, the page goes to not found error. I really have got no idea about this, can someone give me a help on this? my controls in the page is: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  ...

VB.NET Codebehind Code to Update SQL Server 2005 Using SQLDataSource Control?
Hi, I am a newbie in using ASP.NET 2.0 and ADO.NET.  I wrote a hangman game and want to record statistics at the end of each game.  I will create and update records in the database for each authenticated user as well as a record for the Anonymous, unauthenticated user.  After a win or loss has occurred, I want to programmatically use the SQLDataSource control to increment the statistics counters for the appropriate record in the database (note I don't want to show anything or get user input for this function). I need a VB.NET codebehind example that will show me how I sho...

How to create a update button to update two SqlDataSource controls?
I want to update two tables in one page. So I created two FormView bound on two SqlDataSource controls, and I create a Update button on the bottom of page. And I writen some codes as below: btnUpate_Click(object sender, EventArgs e){    sqlDataSource1.Update();    sqlDateSource2.Update();} But, the records haven't updated. In SqlDataSource2_Updating() function, I found all the parameters is null. So, how to modify my code to do it.   Zhang You need to actually set the update parameters.  Take a look at this link. http://msdn2.micro...

Updating and binding control to other controls within the same row of a GridView
HiIn the EditTemplate of my GridView I show 2 DropDownLists. When the user selects the first dropdownlist, I need it to update the contents of the second dropdownlist. I have my Subs that do this fine when not inside the GridView, but what is the correct way to do it whilst they are in the GridView?This is my current attempt that returns the error 'Object reference not set to an instance of an object'. I presume its related to correctly targeting the DropDownList in question? This is my GridView:<asp:GridView ID="GridView1" runat="server"  &...

SQLDataSource not being updated from Gridview
This is my very first edit/update gridview. Things seem to be arranged like they should be in the various examples I've seen, but the update does not actually update the database. I have two gridviews. This one shows the child records of the one above it. That part works fine. THE SQLDATASOURCE  <asp:SqlDataSource ID="sdsRepairs" runat="server" ConnectionString="<%$ ConnectionStrings:afcPropertyConnectionString %>" SelectCommand="RepairsPerVehicle" SelectCommandType="StoredProcedure" * UpdateCommand="UPDATE tblRepairs SET repRepairType = @repRepairType, repDate = @...

gridview control in another gridview control
Hi ia have a questioni have a gridview control which contains button in one colum.now my question is i need another gridview to be placed in the  first gidviewso that when i click on the button the second gridview will populate the data.now my question is how to place second gridview in first gridview.or is there any approach like first grid itself acting as parent and child.please help me  Hi sirikalavalapalli:                I think nested gridview will help you. Check this link and it will show you how...

Help Req: !!! :- On Disabling Controls Present inside a Gridview control
Hi All, We have A requirement Where we have disable controls inside a grid.These controls can be textbox, DropDownlist (in TemplateField), ComandField present inside the grid.We have to call a generic method for doing the same .(since it can be done for multiple grid.) PFB the code snippet we use. Which disables all the controls inside the page.The bolded part of the code is used to loop inside a grid view.(Not Working.)Is this ideal way to deal with the requirement.Or can someone suggest be a better way.        public void DisableMe(Page p1, st...

how to populate a dropdownlist control and update the selected item in a gridview control
Hi friends help me with this ... Requirement: 1) i want to populate a dropdownlist(ddl) in a gridview when clicking the edit button of a perticular row by using gridview events and also update the selected item of the ddl to the database. 2) also i don't want to use sqldatasource controls i.e. we should take the help of only gridview events 3) DropDownList will be populated fom TableB: Actions taken: In page_load while binding the grid i m getting the error: Cannot perform '=' operation on System.Int32 and System.String  my fields and datatypes are as follows...

atlas update panel, update progress bar, calendar control gridview, to detailsview
i have an atlas update panel that contains the calendar control, and gridview controls - outside the update panel i have an update progress bar image that animates while u search and wait for the selected date results to load in the gridivew. this works great.the problem i am having is that when you get the result in the gridview, and have a link to say... a detailsview form - let's say that the user clicks a link to go update the record using that - but then they realize they selected the wrong record and hit their back button - when they get back to the gridview inside t...

Web resources about - Updating Gridview with SqlDataSource with MySQL - asp.net.presentation-controls

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

Gabriel Mongeon
Archive - Gabriel Mongeon

moredotnet
M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out http://www.dotnetUncle.com √ .NET NOTES OOPS in .NET .NET ...

Architectural Overview of the Windows Presentation Foundation Beta 1 Release
Introduction Windows Presentation Foundation Beta 1 Windows Integration New Features WinFX SDK Exploring the New Features Introducing "Express" ...

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at www.asp.net . Rather than type ...

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control
public class ProfiledSqlDataSource : SqlDataSource{ protected override DbProviderFactory GetDbProviderFactory() { // get the "base" DbProviderFactory ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... reports. RadPivotGrid allows easy customization of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, ...

Sign on
Sign On • Join • Forums Home User Name * Password * Remember me next time ( I forgot my password ) SUBMIT YOUR WTF Content Random Article All ...

ComboBox Sample
ComboBox is an ASP.NET AJAX control that, like the AutoCompleteExtender , combines the flexibility of a TextBox with a list of options that users ...

Resources last updated: 1/18/2016 12:42:57 AM