Login   /   Register

Create a Table in a JET Database

Rate this article
     1 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 5
Loading ... Loading ...
April 1st, 2008 by daniva

The following code demonstrates how to create a new table in the Flight32.mdb

Set oConn = CreateObject( "ADODB.Connection" )
 
oConn.Open "QT_Flight32"
 
oConn.Execute "CREATE TABLE EventTable(" & _
    "EventKey COUNTER ," & _
    "Category TEXT(50) ," & _
    "ComputerName TEXT(50) ," & _
    "EventCode INTEGER ," & _
    "RecordNumber INTEGER ," & _
    "SourceName TEXT(50) ," & _
    "TimeWritten DATETIME ," & _
    "UserName TEXT(50) ," & _
    "EventType TEXT(50) ," & _
    "Logfile TEXT(50) ," & _
    "Message MEMO)" 
 
oConn.Close

clip_image002

Posted in ADODB

Leave a Reply

You must be logged in to post a comment.

This article was viewed 531 times