ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit to field size with .CopyFromRecordset (https://www.excelbanter.com/excel-programming/371035-limit-field-size-copyfromrecordset.html)

Jeff M

Limit to field size with .CopyFromRecordset
 
I'm running Excel 2003, trying to retrieve a record set from a stored
procedure in a SQLServer 2000 database. I used to use 'TransposeDim', which
worked great, but I've run into a problem. I've got some data base fields
that are somewhere between 750 - 1000 characters long, and I can't get them
retrieved into my spread sheet. I thought it was a limitation of
TransposeDim, but I have the same problem using CopyFromRecordset. If the
record set has, say, 100 rows, and in row 23 is a field with a large number
of characters, it just displays the first 22 characters, and gives me an
error. The value of err.description is "Object required"

Is there a size limitation here? What am I missing?

Thanks in advance!

Jeff M

Limit to field size with .CopyFromRecordset
 
Here's some more detail from my previous post...

I'm running Excel 2003, trying to retrieve a record set from a stored
procedure in a SQLServer 2000 database. I used to use 'TransposeDim', which
worked great, but I've run into a problem. I've got some data base fields
that are somewhere between 750 - 1000 characters long, and I can't get them
retrieved into my spread sheet. I thought it was a limitation of
TransposeDim, but I have the same problem using CopyFromRecordset. Let's say
the record set has 100 rows, and in row 23 is a field with a large number
of characters. In that case, Excel displays the first 22 rows, and the line

Sheets("Sheet1").Cells(2, 2).CopyFromRecordset rs

gives me an error. The value of err.description is "Object required"

"Jeff M" wrote:

I'm running Excel 2003, trying to retrieve a record set from a stored
procedure in a SQLServer 2000 database. I used to use 'TransposeDim', which
worked great, but I've run into a problem. I've got some data base fields
that are somewhere between 750 - 1000 characters long, and I can't get them
retrieved into my spread sheet. I thought it was a limitation of
TransposeDim, but I have the same problem using CopyFromRecordset. If the
record set has, say, 100 rows, and in row 23 is a field with a large number
of characters, it just displays the first 22 characters, and gives me an
error. The value of err.description is "Object required"

Is there a size limitation here? What am I missing?

Thanks in advance!


NickHK

Limit to field size with .CopyFromRecordset
 
Jeff,
It sounds like this actual error may not be generated because of the length
of the fields but because an object (either Sheet1 or rs) is not valid.
However, there was a recent thread in this NG concerning fields limited to
900ish characters along with a solution of using a QueryTable. May be this
will help:
http://groups.google.co.uk/group/mic...0f8715 193b3a


NickHK

"Jeff M" wrote in message
...
Here's some more detail from my previous post...

I'm running Excel 2003, trying to retrieve a record set from a stored
procedure in a SQLServer 2000 database. I used to use 'TransposeDim',

which
worked great, but I've run into a problem. I've got some data base fields
that are somewhere between 750 - 1000 characters long, and I can't get

them
retrieved into my spread sheet. I thought it was a limitation of
TransposeDim, but I have the same problem using CopyFromRecordset. Let's

say
the record set has 100 rows, and in row 23 is a field with a large number
of characters. In that case, Excel displays the first 22 rows, and the

line

Sheets("Sheet1").Cells(2, 2).CopyFromRecordset rs

gives me an error. The value of err.description is "Object required"

"Jeff M" wrote:

I'm running Excel 2003, trying to retrieve a record set from a stored
procedure in a SQLServer 2000 database. I used to use 'TransposeDim',

which
worked great, but I've run into a problem. I've got some data base

fields
that are somewhere between 750 - 1000 characters long, and I can't get

them
retrieved into my spread sheet. I thought it was a limitation of
TransposeDim, but I have the same problem using CopyFromRecordset. If

the
record set has, say, 100 rows, and in row 23 is a field with a large

number
of characters, it just displays the first 22 characters, and gives me an
error. The value of err.description is "Object required"

Is there a size limitation here? What am I missing?

Thanks in advance!





All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com