Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Populating cell from database (1031 characters)

Hi Folks, I am trying to populate a worksheet from an access front end (SQL
server backend) with the following code. Some data is long text (1031 chars
and more) and it throws an error:

Has anyone succeeded with this sort of thing?

Thanks

Tim

"Application defined or Object defined error"

Do Until rs.EOF
For lCol = 0 To rs.Fields.Count - 1
oXL.Cells(lRow + 1, lCol + 1) = rs(lCol)
Next
lRow = lRow + 1
rs.MoveNext
Loop

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Populating cell from database (1031 characters)

excel 2003
Length of cell contents (text) 32,767 characters. Only 1,024 display in a
cell; all 32,767 display in the formula bar


excel 2007
Total number of characters that a cell can contain 32,767 characters


which version are you using?

--


Gary


"Tim" wrote in message
...
Hi Folks, I am trying to populate a worksheet from an access front end (SQL
server backend) with the following code. Some data is long text (1031 chars
and more) and it throws an error:

Has anyone succeeded with this sort of thing?

Thanks

Tim

"Application defined or Object defined error"

Do Until rs.EOF
For lCol = 0 To rs.Fields.Count - 1
oXL.Cells(lRow + 1, lCol + 1) = rs(lCol)
Next
lRow = lRow + 1
rs.MoveNext
Loop



  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Populating cell from database (1031 characters)

Thanks Gary, Excel 2003 is the version.

The catch is that it actually throws an error when there is a large text
field (eg memo).

"Application defined or Object defined error"

"Gary Keramidas" wrote:

excel 2003
Length of cell contents (text) 32,767 characters. Only 1,024 display in a
cell; all 32,767 display in the formula bar


excel 2007
Total number of characters that a cell can contain 32,767 characters


which version are you using?

--


Gary


"Tim" wrote in message
...
Hi Folks, I am trying to populate a worksheet from an access front end (SQL
server backend) with the following code. Some data is long text (1031 chars
and more) and it throws an error:

Has anyone succeeded with this sort of thing?

Thanks

Tim

"Application defined or Object defined error"

Do Until rs.EOF
For lCol = 0 To rs.Fields.Count - 1
oXL.Cells(lRow + 1, lCol + 1) = rs(lCol)
Next
lRow = lRow + 1
rs.MoveNext
Loop




Reply
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
Error while populating a combobox from Access database shivboy[_13_] Excel Programming 1 June 29th 06 11:04 AM
Populating a database with a template hays4 Excel Programming 0 October 17th 05 11:37 AM
Populating a database from a questionaire Richard Excel Programming 1 October 22nd 04 05:15 AM
Populating data from an external database DavidC[_2_] Excel Programming 1 August 18th 04 06:05 AM
Populating data from an external database DavidC[_2_] Excel Programming 1 August 13th 04 08:23 AM


All times are GMT +1. The time now is 09:33 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"