procedure CreateAndFillParamAccs already called error

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Fischer
Posts: 5
Joined: Thu 03 Apr 2008 10:53

procedure CreateAndFillParamAccs already called error

Post by Fischer » Thu 14 Oct 2010 12:26

dbexpsda.dll version 4.55.23
Delphi 2007 for Win32 Version 11.0.2804.9245
Windows Vista Build 6002 SP2
Microsoft SQL-Server 2005

We have a problem with a CreateAndFillParamAccs error message which allways appears in the following scenario:

Step 1:
Insert a new record into a ClientDataSet which will create a error if it is applied.

Code: Select all

  // Insert a new record without providing a value for the NOT NULL column
  cdsTest.Append;
  cdsTestTestID.Value := -1;
  cdsTestDataRequired.Clear;
  cdsTestDataOptional.Value := 'some data';
  cdsTest.Post;

  // This will show the expected NOT NULL error
  cdsTest.ApplyUpdates(0);
Calling ApplyUpdates leads to the expected error message.

Step 2:
Correct the error by entering the missing value and call ApplyUpdates again.

Code: Select all

  // provide the missing value
  if cdsTest.Locate('TestId', -1, []) then
  begin
    cdsTest.Edit;
    cdsTestDataRequired.Value := 'more data';
    cdsTest.Post;
  end;

  // This shows the CreateAndFillParamAccs Error
  cdsTest.ApplyUpdates(0);
This allways leads to the following error message:

procedure CreateAndFillParamAccs already called (OLEDBAccess.pas, line 5666)

Step 3:
Dont change anything and just call ApplyUpdates again.

Code: Select all

cdsTest.ApplyUpdates(0)
The new record has now been inserted into the database.

The table used for the above steps has been created like this:

Code: Select all

-- Create a simple test table
IF Object_ID('TestTbl') IS NOT NULL
	DROP TABLE TestTbl

CREATE TABLE TestTbl
(
	TestID int IDENTITY(1,1) NOT NULL,
	DataRequired VARCHAR(15) NOT NULL,
	DataOptional VARCHAR(15) NULL		
	CONSTRAINT PK_TestTbl PRIMARY KEY
	(
		TestID ASC
	)
)
If needed we can provide a little test program to show how to reproduce this error.

AndreyZ

Post by AndreyZ » Mon 18 Oct 2010 06:41

Hello,

I cannot reproduce the problem. Please send your test program to andreyz*devart*com.

AndreyZ

Post by AndreyZ » Tue 19 Oct 2010 07:15

Thank you for information. We have reproduced the problem. The investigation of the problem is in progress. As soon as we solve the problem we will let you know.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 25 Oct 2010 13:30

We have fixed this problem. This fix will be included in the next DbxSda build.

sqeeshy
Posts: 1
Joined: Tue 22 Jan 2008 15:19
Contact:

Post by sqeeshy » Wed 10 Nov 2010 08:21

Hello, we have almost the same problem (with same message and behavior) but in VCL components for SQL Server. We use SDAC v.4.8.0.60. There is a bugfix in revision history for SDAC v5.x ("Fixed bug with processing parameters when query is executed with error"), but will this bug be fixed for 4.8.x? Thanks.

AndreyZ

Post by AndreyZ » Wed 10 Nov 2010 09:13

You should upgrade SDAC to version 5.00.0.2 to get this fix. If you have a license for SDAC 4.8, you don't have to buy a new version. Please use your link, username, and password for Registered Users' Area to download SDAC version 5.00.0.2.

Post Reply