Creating a Table

Before you can access data with the ADOCE control, you must have a table available in which to store it. The following code example shows how to create a new ADOCE table in the Databases directory of an H/PC.

Dim rs
Set rs = CreateObject("adoce.recordset")
rs.Open "create table mytable (firstfield text, secondfield integer)"
Set rs = Nothing

Because SQL statements that change the structure of a table leave the recordset closed, you cannot read or write data until the recordset is reopened.