PC Review


Reply
Thread Tools Rate Thread

CopyFromRecordset fails if more than 911 byte in a field

 
 
JesperT
Guest
Posts: n/a
 
      6th Jan 2009

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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: CopyFromRecordset Fails JLGWhiz Microsoft Excel Programming 0 21st Apr 2009 11:13 PM
CopyFromRecordset Fails Bob Microsoft Excel Programming 0 21st Apr 2009 10:31 PM
Excel copyfromrecordset fails with large DAO recordset MacDermott Microsoft Access VBA Modules 0 20th Sep 2007 09:48 PM
CopyFromRecordset fails if string > 911? =?Utf-8?B?S2VuIFZhbGVudGk=?= Microsoft Excel Programming 4 18th Aug 2006 10:31 PM
CopyFromRecordset Fails =?Utf-8?B?RGF2ZSBSdWhs?= Microsoft Access 0 6th Dec 2004 11:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:09 PM.