Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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:39 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, 09:50 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If you are able to make an index on the table using the menu system of Access then you should be able to do the same through code.
If the options to create an index are not available trough the Access interface, then you will not be able to do this through code either.

If that is the case, then your Access option is to import the table data into an Access table and index that, or create an index in the DBMS from which the tables(s) are/is linked.

Are you able to make an index through Access' design system?





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 BOOK: Access 2003 VBA Programmer's Reference 3 May 6th, 2005 02:01 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.