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

I am using Office 2003 on Win XP with ADO 2.8 Object Library and ADO ext 2.8
for DLL and Security. Also have a ref to Access object library.

I know it is possible to create a table in Access from Excel by using ADOX.

Is it possible to create a table in Access from Excel by defining the table
in SQL?
Then deliver the SQL using the ADO execute method. I thought that you could
and that somewhere I had done it.

I am trying the following syntax without luck:
CREATE TABLE tablename (field1 VARCHAR NULL, field2 VARCHAR NULL)

Can someone please correct my SQL or otherwise refresh my memory on this?
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automating Access from Excel

This might be a help for getting data to and from Excel and Access: It
includes examples of using variables in SQL queries.
http://www.bygsoftware.com/examples/sql.html

Or you can get there from the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

It demonstrates how to use SQL in Excel's VBA to:

* create a database,
* create a table
* insert records
* select records,
* update records,
* delete records,
* delete a table,
* delete a database.

DAO and ADO files available.

You can also download the demonstration file called "excelsql.zip".

The code is open and commented.


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy



"quartz" wrote in message
...
I am using Office 2003 on Win XP with ADO 2.8 Object Library and ADO ext

2.8
for DLL and Security. Also have a ref to Access object library.

I know it is possible to create a table in Access from Excel by using

ADOX.

Is it possible to create a table in Access from Excel by defining the

table
in SQL?
Then deliver the SQL using the ADO execute method. I thought that you

could
and that somewhere I had done it.

I am trying the following syntax without luck:
CREATE TABLE tablename (field1 VARCHAR NULL, field2 VARCHAR NULL)

Can someone please correct my SQL or otherwise refresh my memory on this?
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Automating Access from Excel

Thanks Andy!
Actually I got my code running - it was a syntax thing.
But, I like your site very much and I'm finding other tips that are very
helpful.
Thanks a lot!

"Andy Wiggins" wrote:

This might be a help for getting data to and from Excel and Access: It
includes examples of using variables in SQL queries.
http://www.bygsoftware.com/examples/sql.html

Or you can get there from the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

It demonstrates how to use SQL in Excel's VBA to:

* create a database,
* create a table
* insert records
* select records,
* update records,
* delete records,
* delete a table,
* delete a database.

DAO and ADO files available.

You can also download the demonstration file called "excelsql.zip".

The code is open and commented.


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy



"quartz" wrote in message
...
I am using Office 2003 on Win XP with ADO 2.8 Object Library and ADO ext

2.8
for DLL and Security. Also have a ref to Access object library.

I know it is possible to create a table in Access from Excel by using

ADOX.

Is it possible to create a table in Access from Excel by defining the

table
in SQL?
Then deliver the SQL using the ADO execute method. I thought that you

could
and that somewhere I had done it.

I am trying the following syntax without luck:
CREATE TABLE tablename (field1 VARCHAR NULL, field2 VARCHAR NULL)

Can someone please correct my SQL or otherwise refresh my memory on this?
Thanks in advance.




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
automating a control box in excel oa501 Excel Worksheet Functions 2 April 23rd 08 03:09 PM
Automating Excel mvpejp Excel Discussion (Misc queries) 0 November 22nd 05 07:33 PM
Automating Excel w VB.Net 2003 [email protected] Excel Discussion (Misc queries) 0 September 23rd 05 05:37 AM
Automating Excel John Excel Programming 1 January 26th 05 06:44 PM
Automating Excel from VB .NET Howard Kaikow Excel Programming 12 August 31st 03 02:56 AM


All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"