Re: SqlDataAdapter CommandText Size limitations ?
From: David Browne (meat_at_hotmail.com)
Date: 06/08/04
- Next message: Jon Skeet [C# MVP]: "Re: SqlDataAdapter CommandText Size limitations ?"
- Previous message: JJ: "Re: Dataset returned"
- In reply to: gerry: "SqlDataAdapter CommandText Size limitations ?"
- Next in thread: Jon Skeet [C# MVP]: "Re: SqlDataAdapter CommandText Size limitations ?"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Jon Skeet [C# MVP]: "Re: SqlDataAdapter CommandText Size limitations ?"
- Previous message: JJ: "Re: Dataset returned"
- In reply to: gerry: "SqlDataAdapter CommandText Size limitations ?"
- Next in thread: Jon Skeet [C# MVP]: "Re: SqlDataAdapter CommandText Size limitations ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|