473,396 Members | 2,109 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,396 software developers and data experts.

SQLDataSource Configuration not allowing Update, Delete or Insert

I created a new table in Visual Web Developer for SQL Server Express
2005. I created a 'gridview' by dragging the table onto an empty web
form in Visual Developer Express.

Clicked on the smart tag 'configure data source'. When I click Advanced
should see
the Generate Insert, Update and Delete statements check box but it is
greyed
out. It isn't in all the video tutorials I have watched.

Tried to repeat with various new tables, but it always gives the same
result.

Activated the edit button on GridView and it allowed me to edit the
record, but it will not update as DataSource not configured for UPDATE.

What can I be doing wrong ? I am guessing it is a property or a
permission, but permissions not normally a problem in windows

Help my Test Host expires on Microsoft tomorrow and I can not even get
to edit an existing table at local level, never mind test how to upload
and execute on a real host.

Any help appreciated

Richard

Apr 28 '06 #1
3 5997
If it is any help, the same problem occurs with an AccessDataSource !!!

Apr 28 '06 #2
The usual reason for this is that you have not included the primary key in
the Select statement so it cannot autonatically generate corresponding
Insert, Update and Delete statements.

You can still do it all yourself though.

"mosscliffe" wrote:
I created a new table in Visual Web Developer for SQL Server Express
2005. I created a 'gridview' by dragging the table onto an empty web
form in Visual Developer Express.

Clicked on the smart tag 'configure data source'. When I click Advanced
should see
the Generate Insert, Update and Delete statements check box but it is
greyed
out. It isn't in all the video tutorials I have watched.

Tried to repeat with various new tables, but it always gives the same
result.

Activated the edit button on GridView and it allowed me to edit the
record, but it will not update as DataSource not configured for UPDATE.

What can I be doing wrong ? I am guessing it is a property or a
permission, but permissions not normally a problem in windows

Help my Test Host expires on Microsoft tomorrow and I can not even get
to edit an existing table at local level, never mind test how to upload
and execute on a real host.

Any help appreciated

Richard

Apr 28 '06 #3
Genius - I did not even have a primary key specified - now rectified
and all working.

Many, many thanks

Richard

Apr 28 '06 #4

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: Jesse Liberty | last post by:
I created a new database (tried both in 2005 and in SQL 2000) and then created a SqlDataSource control in an asp.net application. Clicked on the smart tag and whose configure data source. When I...
0
by: Steven Blair | last post by:
I have written a simple application allowing me to update a table in my Database using a GridView, DetailsView and two SQLDataSources. Using this method, I wrote no code and my select, insert,...
0
by: Ed | last post by:
All of a sudden my previously working code started throwing this error. from the SqlDatasource. I am using C# and Asp.net 2.0. Getting the following error: You have specified that your delete...
1
by: Mike P | last post by:
I'm a little confused as to how the SqlDataSource works with its DeleteParameters. I have a GridView hooked up to my SqlDataSource. Here is my templatefield with my Delete button : ...
1
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
1
by: Lars | last post by:
Hi I have another problem as well. For some reason the Configuration of the SQLSataSource doesn't allow me to select the commands Insert, Update and Delete. They are grayed. HOwever I seam to be...
0
by: dhyder | last post by:
I'm working on an admin page for a SQL Server 05 db. The page is in ASP.NET 2.0/C#. The db has multiple tables with foreign keys/constraints. I have multiple SqlDataSources and GridViews, which...
1
by: ken | last post by:
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.