LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CopyFromRecordset fails if more than 911 byte in a field


Using ADO (ActiveX 2.8 Object Lib) with Excel 2003, I extract data from a
worksheet and copy it to another worksheet in the same workbook.
In Office 2007 everything is fine, but in Office XP and Office 2003 the
CopyFromRecordset fails if a field has more than 911 bytes.

Here is a snippet of my code:
If rs2.EOF = True Then
wsExe.Range("B3").Value = "No Data found with selected Criteria"
Else
formatcolumn wsExe 'make sure we can store memo size fields
On Error GoTo 0
wsExe.Range("A3").CopyFromRecordset rs2
End If

The CopyFromRecordset instruction fails, and doesn't give any errors, just
simply exit the entire Sub. (i.e. doesn't even reach the End If)

Apart from splitting column's which 'potentially' can have large amount of
text, does anyone have a 'proper' solution for this.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to include field name in CopyFromRecordset clara Excel Programming 3 February 8th 08 08:37 PM
Limit to field size with .CopyFromRecordset Jeff M Excel Programming 2 August 22nd 06 07:10 AM
CopyFromRecordset fails if string 911? Ken Valenti Excel Programming 4 August 18th 06 10:31 PM
Excel 2003 SP1: CopyFromRecordset error if field above 911 charact Nathan Holmes Excel Programming 0 February 6th 06 09:35 PM
copyfromrecordset fails after upgrade to XP and Excel 2003 [email protected] Excel Programming 0 April 28th 05 06:06 PM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"