Re: SqlDataAdapter CommandText Size limitations ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Browne (meat_at_hotmail.com)
Date: 06/08/04


Date: Tue, 8 Jun 2004 11:46:14 -0500


"gerry" <germ@hotmail.com> wrote in message
news:%23ZZTiTXTEHA.2972@TK2MSFTNGP12.phx.gbl...
> I have an SqlDataAdapter setup with the following insert command :
>
> insert into SomeTable
>
([_ID],[ACCOUNT],[DESCRIPTION],[INACTIVE],[LINE_TYPE],[BAL_TYPE],[ACCT_TYPE]
>
,[SORT_GROUP],[POST_TYPE],[COST_CNTR],[FREIGHT],[PROD_LINE_CD],[TEST_ACCOUNT
> ]) values
>
(@_ID,@ACCOUNT,@DESCRIPTION,@INACTIVE,@LINE_TYPE,@BAL_TYPE,@ACCT_TYPE,@SORT_
> GROUP,@POST_TYPE,@COST_CNTR,@FREIGHT,@PROD_LINE_CD,@TEST_ACCOUNT)
>
> which generates the following error :
>
> System.Data.SqlClient.SqlException: Prepared statement '(@_ID
> nvarchar(11),@ACCOUNT nvarchar(11),@DESCRIPTION nvarchar(3' expects
> parameter @LINE_TYPE, which was not supplied.
> at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
> DataTableMapping tableMapping)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
> srcTable)
>
> since I have no problem with this in other tables I am assuming that there
> is a maximum length for the prepared statements that is being exceeded
> I have not found any documentation either supporting or refuting this
> assumption.
> At just over 300 bytes this seems like an extremely low limit.

This has nothing to do whith the length of your SQL.

The error means that you failed to bind a parameter called "@LINE_TYPE".

David



Relevant Pages

  • SqlDataAdapter CommandText Size limitations ?
    ... I have an SqlDataAdapter setup with the following insert command: ... System.Data.SqlClient.SqlException: Prepared statement '(@_ID ... I have not found any documentation either supporting or refuting this ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Great SWT Program
    ... I think this syntax may go back to the Bourne shell. ... In most of the Unix shells I've used, as best I can remember, ... do requires launching an external command to massage some data, ... although how the documentation would lead a non-expert user to ...
    (comp.lang.java.programmer)
  • Single Source Documentation Woes
    ... provide the ability to single-source user manual documentation, ... | (WAP, HTML, etc.) | ... Application Name has the following command line options: ... To make life truly entertaining, ...
    (comp.programming)
  • Re: COPY bug with remote task as input.
    ... >:I think this is a bug in the COPY command. ... I cannot find it anymore in the VMS 7.3 documentation. ... This section seems to imply that any command which accepts an input file ... You should at least admit that the error message is confusing. ...
    (comp.os.vms)
  • Re: [RFC PATCH 1/3] Replace paravirt_probe with "platform type" boot header field
    ... out in boot loader protocol 2.04; see the documentation. ... *STABBITY STAB STAB STAB*. ... 2K for the command line. ...
    (Linux-Kernel)