From: BruceL on 18 Feb 2010 10:09 I have a VB6 application using an ADODB.Recordset to write to an SQL server database. It generates the error below because the record size has exceeded the 8060 character limit. I know I can cancel the update after the update instruction, but I am wondering what code I may be able to use to check the record size before the update instruction to see if it will exceed the limit. Thank you for any help. -2147217885 microsoft odbc sql driver sql server cannot create a row of size 8294 which is greater than the allowable maximum of 8060 -- BruceL
From: Paul Clement on 18 Feb 2010 11:06 On Thu, 18 Feb 2010 07:09:01 -0800, BruceL <BruceL(a)discussions.microsoft.com> wrote: � I have a VB6 application using an ADODB.Recordset to write to an SQL server � database. It generates the error below because the record size has exceeded � the 8060 character limit. I know I can cancel the update after the update � instruction, but I am wondering what code I may be able to use to check the � record size before the update instruction to see if it will exceed the limit. � Thank you for any help. � � -2147217885 microsoft odbc sql driver sql server cannot create a row of size � 8294 which is greater than the allowable maximum of 8060 I would imagine that you would have to check the length of all your parameter values. The alternative would be to varchar(max) for the column data types that hold a lot of data (or ntext, text or image if you're using an older version of SQL Server). Paul ~~~~ Microsoft MVP (Visual Basic)
From: BruceL on 18 Feb 2010 12:21 Thanks for the response. I know I can limit the size of the large text field that ends up causing the total record size to go over the limit so this error never occurs but thought there may be some code I could add right before the update command to check the size without actually having to go through the update command and then trapping the error. -- BruceL "Paul Clement" wrote: > On Thu, 18 Feb 2010 07:09:01 -0800, BruceL <BruceL(a)discussions.microsoft.com> wrote: > > ¤ I have a VB6 application using an ADODB.Recordset to write to an SQL server > ¤ database. It generates the error below because the record size has exceeded > ¤ the 8060 character limit. I know I can cancel the update after the update > ¤ instruction, but I am wondering what code I may be able to use to check the > ¤ record size before the update instruction to see if it will exceed the limit. > ¤ Thank you for any help. > ¤ > ¤ -2147217885 microsoft odbc sql driver sql server cannot create a row of size > ¤ 8294 which is greater than the allowable maximum of 8060 > > I would imagine that you would have to check the length of all your parameter values. > > The alternative would be to varchar(max) for the column data types that hold a lot of data (or > ntext, text or image if you're using an older version of SQL Server). > > > Paul > ~~~~ > Microsoft MVP (Visual Basic) > . >
From: Nobody on 18 Feb 2010 12:39 "BruceL" <BruceL(a)discussions.microsoft.com> wrote in message news:A609AD5A-11B6-4577-9AF4-7C1F7C99F231(a)microsoft.com... >I have a VB6 application using an ADODB.Recordset to write to an SQL >server > database. It generates the error below because the record size has > exceeded > the 8060 character limit. I know I can cancel the update after the update > instruction, but I am wondering what code I may be able to use to check > the > record size before the update instruction to see if it will exceed the > limit. > Thank you for any help. > > -2147217885 microsoft odbc sql driver sql server cannot create a row of > size > 8294 which is greater than the allowable maximum of 8060 Loop through the Fields collection and check DefinedSize property. You may want to also check other properties, such as Type property.
From: Nobody on 18 Feb 2010 13:01 "Nobody" <nobody(a)nobody.com> wrote in message news:OmreiFMsKHA.5180(a)TK2MSFTNGP05.phx.gbl... > Loop through the Fields collection and check DefinedSize property. You may > want to also check other properties, such as Type property. Also, OpenSchema Method of the Connection object lets you enumerate databases(adSchemaCatalogs), tables(adSchemaTables), and fields(adSchemaColumns) within a given server. I used it once to let a user select which DB, table and field to import information from.
|
Pages: 1 Prev: Dell Studio 17 laptop in India Next: error line source code |