Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send SQL to Access from Excel using ADO

I think this has something to do with the [EXCEL 5.0;]
portion of my string
as folows:

strSQL = "SELECT [SYMBOLS$].* INTO [SYMBOLS_ALL] FROM

[SYMBOLS$] IN '" &
strFullName & "'[EXCEL 5.0;];"


I prefer Jet's 'brackets' syntax to the IN syntax you are
trying to use. With an alias for the Excel worksheet
(table), try something like this:

SELECT XL.*
INTO SYMBOLS_ALL
FROM [Excel 5.0;Database=C:\MyFolder\MyWorkbook.xls;].
[SYMBOLS$] AS XL;

BTW Excel 5.0 is for Excel95 (and some below) format. For
Excel97 and above formats, use Excel 8.0 in your
connection string.

Also, as you are using ADO, ensure your source workbook
(strFullName) is not an open workbook, otherwise you'll
fall foul of the dreaded ADO memory leak bug (or something
very much like it).

Jamie.

--


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
Excel 2003 giving annoying "Send/Don't Send" error when closing BigDaddyCool Excel Discussion (Misc queries) 0 January 29th 10 02:31 AM
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
My send to in excel/word does not offer send as attachment Mstink Excel Discussion (Misc queries) 11 March 16th 06 02:49 PM
Send Excel data to Access through button julesferreira Excel Discussion (Misc queries) 1 June 17th 05 07:30 PM
Send Data to Access Tiffany[_3_] Excel Programming 2 October 23rd 03 06:12 PM


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