473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Question/bugs about ASp.NET2.0 SqlDataSource and GridView

ken
Hi All,

I try to using the dotnet control instead of code behind to create a quick
solution
(ASP.NET with VB.NET) by using the SqlDataSource and GridView control
(with
SelectCommand, DeleteCommand, UpdateCommand, InsertCommand)
It works fine when drag and drop in the first time. but after I have modify
something
(said, add parmeters for searching...etc), the UpdateCommand and
DeleteCommand
failed! (that means can not update feilds or delete records. the dataset is
simple one
table with primary key), only the InsertCommand works!

I need to clear both SqlDataSource and GridView, redo again to solve it!
whats the problem, is there bugs in DotNet Control ??

thx all

Jun 27 '08 #1
1 1381
Hi Ken,

I do not see any issues with the SQLDatasource, I would recommend you to
reconfigure your SQLDatasource. When you select the fields from the table
then you select the option advanced and then check both the options for
creating the insert, update and delete statements and then check for use the
Optimistic concurrency. Rebind the Grid control with the SQLDatasource.

Please let me know your observation.

Regards,
Manish
www.ComponentOne.com
"ken" wrote:
Hi All,

I try to using the dotnet control instead of code behind to create a quick
solution
(ASP.NET with VB.NET) by using the SqlDataSource and GridView control
(with
SelectCommand, DeleteCommand, UpdateCommand, InsertCommand)
It works fine when drag and drop in the first time. but after I have modify
something
(said, add parmeters for searching...etc), the UpdateCommand and
DeleteCommand
failed! (that means can not update feilds or delete records. the dataset is
simple one
table with primary key), only the InsertCommand works!

I need to clear both SqlDataSource and GridView, redo again to solve it!
whats the problem, is there bugs in DotNet Control ??

thx all

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
3
by: adam222 | last post by:
hello, i have a web-form with a GridView control, i wanted to update & delete, using the AutoGenerateEditButton. when i used it with sqlDataSource (executing SP in the DB) it works like a...
4
by: Bishop | last post by:
I have a number of simple select queries that a user needs to be able to execute and display the data on the screen in a gridview. My thought was that I could use a Gridview set to dymanically...
3
by: simonZ | last post by:
In gridView I have dropdown list : <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField...
2
by: Bob | last post by:
Hi All: I have a GridView with several pages and a FormView linked via a ControlParameter. The FormView populates correctly when the user makes a selection from the first page of the grid. ...
0
by: Nick | last post by:
i am a new to asp.net and what i am trying to do is simple have a grid view, which just load a contact name , there is three fields in this table, contactid, contactname and contact phone. I have...
3
by: Jason Wilson | last post by:
OK I'm obviously fairly new to ASP.NET 2.0. I've used gridviews in the past but only for pages with static queries that happen onload. Now I have pretty simple scenario and I think I've followed...
0
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.