Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 20
Default Excel2002 - use sql statements?

That was a great article. Thanks very much for the
reference.


-----Original Message-----

"Ron" wrote in

message
...
Hello,

Just checking if it is possible to define a range of

data
in a sheet as a table for use with Sql Statements. Is
this doable?

Example: if I link an Excel sheet into an Access mdb I
can say "Insert Into Sheet1 Select * From Table1" where
table1 contains several rows of data which I can insert
directly into the linked sheet. But what I would like

to
do is to take a range of data from an Excel Sheet and

use
ADO command object to pass the data as a batch to an
Access mdb Table.

Pseudocode-----------------
cmd.CommandText = "Insert Into Table1 Select * From

Sheet1"
or
cmd.CommandText = "Insert Into Table1 Select * From

Rng1"
or (if Excel has a table object)
cmd.CommandText = "Insert Into Table1 Select * From
tblSheet1"

where (real pseudocode here)---------------
Dim tblSheet1 As Excel.Table
Set tblSheet1 = Rng1

Thanks


http://support.microsoft.com/kb/278973/EN-US/

/Fredrik


.

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
excel2002 JWD Setting up and Configuration of Excel 0 November 9th 09 03:55 PM
Text book Excel2002 VBA octet Excel Discussion (Misc queries) 1 May 22nd 09 12:02 PM
Hyperlink Excel2000 vs Excel2002 Darrell Wesley[_2_] Excel Programming 5 January 11th 05 06:35 PM
Excel2002 autoformats dates, Bob Excel Programming 0 April 21st 04 05:51 PM
VBA and comments in Excel2002 Neil Garrard Excel Programming 2 February 25th 04 12:50 PM


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