Arguments are of the wrong type message using TADODataSet for simple stored procedure



Hello

I have a really annoying problem.

I have a simple stored procedure in my SQL Server database

CREATE PROCEDURE SpecificInsert
@nTest as int
AS
GO

This stored procedure will not return a dataset

I have then added a TADODataSet component to my form

object ADODataSet2: TADODataSet
Connection = DB
ExecuteOptions = [eoAsyncExecute, eoExecuteNoRecords]
CommandText = 'SpecificInsert;1'
CommandType = cmdStoredProc
Parameters = <
item
Name = '@RETURN_VALUE'
DataType = ftInteger
Direction = pdReturnValue
Precision = 10
Value = 0
end
item
Name = '@nTest'
Attributes = [paNullable]
DataType = ftInteger
Precision = 10
Value = 1
end>
Prepared = True
Left = 466
Top = 5
end

When I try to make the dataset active - as in run the stored procedure - I
get the "Arguments are of the wrong type or are in conflict with each other"
message

This is really annoying me now, I have never tried this before, would I be
better using a command?

Cheers

Paul


.



Relevant Pages

  • Re: question on sql
    ... be used to show stored procedures that qualify for the filter. ... Yes crdate will tell you when the stored procedure was created, ... > just set your commandtext property of your command object to the stored ... You may want to run this by the Sql Server NG group ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VB - Stored Procs vs queries
    ... things more difficult than just sending queries, ... hard to optimize a query using a stored procedure. ... >> commandtext or should I use a stored procedure and simply pass through ...
    (microsoft.public.sqlserver.programming)
  • Re: question on sql
    ... > 1.)How can i save the stored procedure in sql 2005 server, ... > NOT in file location ... --Do you want to just create a Stored Procedure via Code and not have to ... just set your commandtext property of your command object to the stored proc ...
    (microsoft.public.dotnet.framework.adonet)
  • The precision is invalid
    ... I'm trying to update a table using a stored procedure. ... The line# reference is on the last line: ... I believe 6 is datatype money, ... The precision is invalid. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Stored Procedure Help
    ... > But how can I add my stored procedures parameters to the commandtext?? ... set the the commandtype to stored procedure and point ... >> refresh the grid. ... Be sure to disable controls before calling the close, ...
    (borland.public.delphi.database.ado)