Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQLDataSource Configuration not allowing Update, Delete or Insert

Reply
Thread Tools

SQLDataSource Configuration not allowing Update, Delete or Insert

 
 
mosscliffe
Guest
Posts: n/a
 
      04-28-2006
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

 
Reply With Quote
 
 
 
 
mosscliffe
Guest
Posts: n/a
 
      04-28-2006
If it is any help, the same problem occurs with an AccessDataSource !!!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Y2xpY2tvbg==?=
Guest
Posts: n/a
 
      04-28-2006
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
>
>

 
Reply With Quote
 
mosscliffe
Guest
Posts: n/a
 
      04-28-2006
Genius - I did not even have a primary key specified - now rectified
and all working.

Many, many thanks

Richard

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option to update, delete not available when creating SqlDataSource Jesse Liberty ASP .Net 4 11-22-2011 06:31 AM
Insert data from a SqlDataSource control? Carlos ASP .Net 0 09-21-2006 02:47 PM
Simple insert with SqlDataSource doesn't work - why? staeri@gmail.com ASP .Net 7 04-20-2006 07:19 PM
insert row using Gridview and SqlDataSource? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 2 03-20-2006 02:49 PM
SqlDataSource INSERT query and TextBox text Hrvoje Vrbanc ASP .Net 0 12-08-2005 06:36 PM



Advertisments