Wrox Programmer Forums
|
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2005, 07:33 AM
Registered User
 
Join Date: Mar 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Making DDL queries to linked tables

Hello.
I have problems with making DDL Queries to linked table.

I opened the recordset (Access linked table) with ADODB.Connction and ADODB.Recordset in Excel and made a DDL Query to that recordset: CREATE INDEX,
but received the error message:
Error: -2147467259-[Microsoft][ODBC Microsoft Access Driver] Cannot execute data definition statements on linked data sources.

How can I solve this problem?

Should I create "clone" of linked table before making query or is it possible to allow
make DDL queries (like CREATE INDEX, DROP INDEX,...) to linked tables (in VBA)?




Jüri Kuusik.
[email protected]
 
Old May 2nd, 2005, 06:05 PM
Authorized User
 
Join Date: Jul 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have to open the connection against the backend database where the actual tables reside - not the frontend where the linked tables are.

Graham R Seach
Microsoft Access MVP
 
Old May 6th, 2005, 01:50 AM
Registered User
 
Join Date: Mar 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for suggestion!
Do You mean that I have to open in VBA Access file (source file),
then create index for the table, which is in the that Access file,
and then some make a query to table, which is linked to source Access file,
and then delete the index from the source Access file?



Jüri Kuusik.
[email protected]
 
Old May 6th, 2005, 02:01 AM
Authorized User
 
Join Date: Jul 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In VBA, you have to open the database that contains the actual tables (not the linked tables), and execute the DDL queries against the actual tables in that database.

This kind of question is not related to the book. You really should direct this type of question to the appropriate forum. I suggest posting such future questions to the Microsoft product-specific newsgroups. See the following page for instructions on how to connect to the Microsoft newsgroups.

http://www.pacificdb.com.au/MVP/newsgroup.htm

Graham R Seach
Microsoft Access MVP





Similar Threads
Thread Thread Starter Forum Replies Last Post
how can selectedvalue of DDL make other DDL visibl hertendreef ASP.NET 2.0 Professional 4 May 20th, 2008 04:38 PM
Linked Tables edojan Access 1 July 20th, 2006 10:49 AM
Linked Tables ru1 Access 1 September 21st, 2005 07:24 AM
Making DDL queries to linked tables jkuusik Access VBA 1 May 2nd, 2005 09:50 AM
Linked Tables ricmar Access VBA 6 July 28th, 2004 05:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.