Incoming tabular data stream (TDS) remote procedure caal (RPC) protocol is incorrect. Parameter 5 datatype has an invali

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Olivier Olmer
Posts: 8
Joined: Wed 09 Mar 2005 12:11

Incoming tabular data stream (TDS) remote procedure caal (RPC) protocol is incorrect. Parameter 5 datatype has an invali

Post by Olivier Olmer » Mon 09 Jul 2007 11:01

Hi,

We have are using Delphi 5 with version 3.8 and all of our projects work correctly. When we moved to the latest version 4.10 we get the following messages on each update or insert query. The Error we get is :

Incoming tabular data stream (TDS) remote procedure caal (RPC) protocol is incorrect. Parameter 5 datatype has an invalid length or metadatalength

To test the error we define in the database a table:
create table Test
(
TestId int identity(1,1),
Description nvarchar(50) not null,
DBUserName varchar(32),
Dlc datetime,
constraint PKTestId primary key(TestId)
)

create procedure TestValidate(@TestId int, @Description nvarchar(50))
as
begin
if @Description IS null begin
raiserror('column ''Description''Description is missing', 16, 1)
end
end

create procedure TestInsert(@Description nvarchar(50))
as
begin
exec TestValidate null,@Description
if @@Error = 0 begin
insert into Test(Description)
values (@Description)
return scope_identity()
end
end

create procedure TestUpdate(@TestId int, @Description nvarchar(50))
as
begin
exec TestValidate @TestId, @Description
if @@Error = 0 begin
update
Test
set
Description = @Description
where
TestId=@TestId
end
end

create procedure TestSelectId(@TestId int)
as
begin
select
Test.TestId,
Test.Description,
Test.DBUserName,
Test.Dlc
from
Test
where
TestId=@TestId
end



The structure of TMSQuery is
Sql.Text = exec TestSelectId :TestId
SqlUpdatel = exec TestUpdate :TestId, :Description
SqlInsertl = exec :TestId = TestInsert :Description

Options.QueryIdentity = False
Options.StrictUpdate = False
Options.NumberRange = True
Options.ReturnParams = True

After modifying or insert a record we get the error as show above. Also we see in the trace of SqlServer profiler the TestUpdate or the TestInsert is not logged at all. The exception is raised in OleDbAccess method CheckAndAnalyze(Status = -2147217900). At this point the trace of Sql server does not have anything logged in the profiler.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 10 Jul 2007 12:30

Thank you for such detailed information. It was easy to reproduce the problem with it. Now we are working on the problem. As soon as we solve it, we will let you know.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 11 Jul 2007 13:39

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

Post Reply