Skip to main content

Posts

Showing posts from November, 2009

How To Use ADOX with Excel Data from Visual Basic or VBA

The ActiveX Data Objects Extensions for Data Definition Language and Security (ADOX) gives ActiveX Data Objects (ADO) developers the capabilities that are present in Data Access Objects (DAO) to manipulate databases, tables, fields and other database objects programmatically. Since the release of Microsoft OLE DB Provider for Jet version 4.0, which supports the ISAM drivers that the Jet engine uses with desktop databases other than Microsoft Access, ADO developers have been able to use both ADO and ADOX with Microsoft Excel workbooks and worksheets. However, because an Excel worksheet is not an ordinary database, ADO has some limitations when it is used with Excel. In particular, many ADOX methods either do not work or give unexpected results when they are used with Excel. This article documents many of the limitations of ADOX and Excel. For additional information about the use of ADO with Excel, click the article number below to view the article in the Microsoft Knowledge Base: 25781...

How To Create a Table with Primary Key Through ADOX

ADOX is an extension to ActiveX Data Objects that allows the manipulation of the database schema. This article illustrates how to use ADOX to create a table and add a Primary Key. NOTE : Not all OLE DB providers support the interfaces required to support ADOX methods. With those providers, you have to use Data Definition Queries or another object model to manipulate the database schema. The first procedure in the example below creates a new table in an existing Microsoft Access database, creates a new field in that table, then creates a primary key index. When adding a single-field primary key, you do not need to use the ADOX Key object. The second procedure utilizes the ADOX Key object to add a multiple field key to a table. Steps to Create the Sample Application In Microsoft Visual Basic 5.0 or 6.0, create a new Standard EXE project. Form1 is created by default. On the Project menu, select References to add the following type libraries: Microsoft Act...

Connect us

Name

Email *

Message *