Hey jtokach (what`s your first name ?)Guess we can start at the beginning, how to dynamically define and create a new MS Access table:
1) Go into MS Access and create a new database, call it DB1.MDB
2) Run the following script that will create a table called JTOKACH in DB1.MDB that contains like a small address book schema. Don`t forget to change $DATABASE to point this script to your new database. Hope this is the kind of information you were looking for.
Break On
$=SetOption("wrapateol","on")
$DATABASE = "C:\ACCESS\DB1.MDB" ; <--- change this
$DSN = "DATA SOURCE=$DATABASE; PROVIDER=MICROSOFT.JET.OLEDB.4.0;"
$SQL = "CREATE TABLE JTOKACH (NAME CHAR(50) PRIMARY KEY, ADDRESS CHAR(50), PHONE CHAR(20))"
$Connection = CreateObject("ADODB.Connection")
If $Connection
$Connection.ConnectionString = $DSN
$Connection.Open()
$=$Connection.Execute("$SQL")
If @ERROR
?"@SERROR"
Else
?"Table successfully created."
Endif
$Connection.Close()
$Connection = 0
Else
?"ADODB is not installed on this machine"
Endif
Exit 1
-Shawn
[ 16 January 2002: Message edited by: Shawn ]