J
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.
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.