Page view counter

AddParameter method for sqlServer TEXT field type

Last post 02-23-2007 6:22 PM by SGWellens. 1 replies.

Sort Posts:

  • AddParameter method for sqlServer TEXT field type

    02-22-2007, 7:21 PM
    • Loading...
    • KenA
    • Joined on 04-02-2003, 5:43 AM
    • Brazil
    • Posts 157
    • Points 562

    Hi,

    Normally I use the following method to add parameters:

    oDb = DatabaseFactory.CreateDatabase();
    oCmd = oDb.GetStoredProcCommand( "usp_someSproc" ); 
    oDb.AddInParameter( oCmd, "@someField", DbType.String, pDesc );
    oDr = oDb.ExecuteReader( oCmd );

    Works fine, considering that @someField is a varchar field in the DB. BUT in case @someField is a TEXT field in the DB, if
    I still use oDb.AddInParameter( oCmd, "@someField", DbType.String, pDesc ); it will work for small amounts of text, but for
    real long text I need a DbType.TEXT which I don´t have through the AddInParameter way ...

    Would someone post a code sample on how to add parameters for the Text field in sql server?

     

    »»» KenA
  • Re: AddParameter method for sqlServer TEXT field type

    02-23-2007, 6:22 PM
    • Loading...
    • SGWellens
    • Joined on 01-02-2007, 4:27 PM
    • Twin Cities, MN USA
    • Posts 6,041
    • Points 72,033
    • Moderator
      TrustedFriends-MVPs

    You may find this thread helpful:

    http://forums.asp.net/thread/437849.aspx

    Steve Wellens

    My blog
Page 1 of 1 (2 items)