473,387 Members | 3,781 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,387 software developers and data experts.

Automatically generating Update and Delete commands

JJ
Hi All,

is there a limit to the size of an update or delete command that
a data adapter will automatically create. I have just added another
varchar field to my table and when I attempt to now add the modified
data adapter to my form the wizard informs me that it can not
generate the code for the update and delete commands. If I
remove the newly added field and attempt to add the new
data adapter (after removing the existing one) then everything
appears to work fine. There is nothing special about the table,
or the newly added field.

Any ideas, or do I know have to create all of the sql commands
by hand.

I tried to add a da from the data tool box (instead of dragging
the table from the database) and get the wizard to generate
stored procedures as well, but this came back with the same error.

The SP for the SELECT command is
ALTER PROCEDURE dbo.usp_SelectComplaint
AS
SET NOCOUNT ON;
SELECT pID, pcID, pDate, pDetails, pOriginator, pStat FROM
tblComplaint
So as you can see it's not too taxing.

The insert command can be generated. The SP for that is
ALTER PROCEDURE dbo.usp_InsertComplaint
(
@pcID int,
@pDate datetime,
@pDetails varchar(250),
@pOriginator varchar(50),
@pStat char(10)
)
AS
SET NOCOUNT OFF;
INSERT INTO tblComplaint(pcID, pDate, pDetails, pOriginator, pStat)
VALUES (@pcID, @pDate, @pDetails, @pOriginator, @pStat);
SELECT pID, pcID, pDate, pDetails, pOriginator, pStat FROM
tblComplaint WHERE (pID = @@IDENTITY)
Which, once again is reasonably straight forward.

Thanks for the help.

Jason.
Nov 20 '05 #1
1 1209
"JJ" <ja***@nospam.divemaster.org> schrieb

is there a limit to the size of an update or delete command that
a data adapter will automatically create. I have just added
another varchar field to my table and when I attempt to now add the


I think the ADO.Net group has been established for these kind of questions:
microsoft.public.dotnet.framework.adonet
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

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

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
4
by: Oscar Thornell | last post by:
Hi, I have a relativley large/complex typed dataset that contains 7-8 tables and some supporting relational tables (lookups) for many-to-many relations. A good exampel would be a dataset that...
4
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft...
1
by: JJ | last post by:
Hi All, is there a limit to the size of an update or delete command that a data adapter will automatically create. I have just added another varchar field to my table and when I attempt to now...
3
by: RJN | last post by:
Hi I'm using the Dataadapter and Dataset to do an insert/update/delete into tables. The dataset has multiple tables in it. I want to write my own Update/Insert commands for the Dataadapter for...
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...
4
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID...
3
by: Patrick.O.Ige | last post by:
Hi guys, Is there any free stuff to generate DAL code out there? Thanks in advance
13
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I am using VS2005. I created a Windows Appication project. Inside the Server Explorer, I created a new SQLExpress database, and then created a new table. I added the rows, making my first row an...
2
by: Alaashamas | last post by:
I have in project in VisualBasic .NET. This project should display,add,modify,delete the rows of the tables from SQLServer EXPRESS. For this i made a connection to the SqlServer Express through the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.