Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table creation with DAO.... ADO

Status
Not open for further replies.

edrest

Programmer
Apr 22, 2000
73
US
If you use DAO or ADO to create a table is that table in the Access mdb format? <p>Tom Gahagan<br><a href=mailto:edrest@alltel.net>edrest@alltel.net</a><br><a href= > </a><br>REST<br>
<br>
Your my reason for reason.... Carlos Santana
 
When you say in an mdb format, that is not quite correct.<br><br>A table is an object within an .mdb file.<br>When you create a table in code, it is saved into whatever .mdb file you create it in.<br>Access is a &quot;Self-Contained&quot; application in that all the objects (tables, queries, forms, etc) &quot;live&quot; or reside in one (.mdb) file.<br>VB however, is different whereas the objects are saved as their own files (.frm (forms), .bas (modules))<br><br>Hope this helps <p>Jim Lunde<br><a href=mailto:compugeeks@hotmail.com>compugeeks@hotmail.com</a><br><a href= Application Development
 
Thanks Jimmy....<br><br>I understand the differences and just did not word my quesiton very well. <p>Tom Gahagan<br><a href=mailto:edrest@alltel.net>edrest@alltel.net</a><br><a href= > </a><br>REST<br>
<br>
Your my reason for reason.... Carlos Santana
 
Can you post an ADO example of creating a new table ( &quot;NewTable&quot;) with two fields( &quot;Fld1&quot; and &quot;Fld2&quot;) in an existing jet database (&quot;SomeDatabase&quot;). I have not been able to find any references with samples of how to do this in ADO.
Thanks, Billg
 
dim cat as new adox catalog
dim tbl as new adox.table
cat.activeconnection= &quot;provider=Microsoft.jet.oledb.4.0;&quot;data source = .\somedatabase.mdb&quot;
with tbl
.name = &quot;newtable&quot;
.columns.append &quot;fld1&quot;,adinteger
.columns.append &quot;fld2&quot;,advarwchar
end with
cat.tables.append tbl
set cat = nothing

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top