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 there is any limitation for text field when using ADO +SQL

could you give me some advice?


my platform is office 2003 (english) Sp1. Please see attachment fo
details

Usuallly I use Ado and "select * from [sheet1$]" to deal with som
database in excel spreadsheet. but I found the vba program will b
stopped if one cell of some text field include a lot of characters.
have tested it. I found if the number of all characters in one cell i
less than or equal to 911, it is okay. But if the number is bigge
than 911, then vba will be stoped.
show:

run-time error : -2147467259 (80004005)
Method copyfromrecordset of object range failed

my code is :

Sub inputdata()
Dim x As Object
Dim yy As Object
Dim sql As String
Dim mysheet As Object

Set x = CreateObject("ADODB.Connection")

x.Open "Provider= Microsoft.Jet.OLEDB.4.0;Extended Properties=Exce
8.0;Data Source=" & ThisWorkbook.FullName

Set mysheet = Sheet2

sql = " select * from [sheet1$] "

Set yy = x.Execute(sql)
mysheet.Cells(1, 1).CopyFromRecordset yy
Set x = Nothing
Set yy = Nothing

End Sub

I do not how to upload my excel spreadsheet in this forum. if someon
knows, please help me. You could leave a email, I could send th
spreadsheet to you, you can test.

by the way, to my surprise, my chinese friend, who use officexp, o
office 2003 (chinese) can run the program in excel no problem. th
result can correct even the number of characters in one cel
increases to 9000.

could you give me some feedback. thank you

 
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
Text Limitation in an Excel Cell mazzullo Excel Discussion (Misc queries) 1 May 22nd 07 10:58 PM
Text wrap in a cell and character limitation carmie Excel Discussion (Misc queries) 1 November 17th 06 10:35 PM
there is any limitation for text field when using ADO +SQL dj100 Excel Programming 0 August 9th 05 04:07 PM
HELP!! Populate text in single XL field, or bulk copy text into 1 field filmfatale[_2_] Excel Programming 0 December 9th 03 02:30 PM
Work around Calculated Field limitation Tod[_3_] Excel Programming 1 November 13th 03 04:52 PM


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