View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
PatK PatK is offline
external usenet poster
 
Posts: 96
Default SQL Query to Excel

I shall try and see how it goes. Ultimately, I selected the 20+ fields I
really needed, in the SQL Select statement, and that worked fine. I just
coudl not do * in the select statement. Thanks for the help, all.

Patk

"Dick Kusleika" wrote:

On Wed, 23 Jul 2008 11:53:01 -0700, PatK
wrote:

Well..that helped part of the problem. I am now consistently getting 3 of the
120+ columns of data, in the table (there are about 6000 rows X 128 columns
per row). SO, that's a start. Is there some "max" that I am crashing in to
with that many columns of data? DOes it make any difference that this is a
sql view, vs a table?


Try this:

Set rs = con.Execute(strWhere, , 1)
MsgBox rs.Fields.Count
Range("a1").CopyFromRecordset rs

That will tell us if it's problem with the data provider or with Excel's
CopyFromRecordset method.

I don't know of any maximums or any problems with view vs. tables.
--
Dick