Where to execute this VBScript to populate tables...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create tables using sample scripts below... could someone point me to where I populate this into Access DB
Much Appreciated
-Lawrenc

Dim ERwinWorkspace As Workspac
Dim ERwinDatabase As Databas
Dim ERwinTableDef As TableDe
Dim ERwinField As Fiel
Dim ERwinRelation As Relatio
Set ERwinWorkspace = DBEngine.Workspaces(0
Set ERwinDatabase = ERwinWorkspace.OpenDatabase(sERwinDatabase
' DELETE TABLE "F_Operating_Expense
ERwinDatabase.TableDefs.Delete "F_Operating_Expense
' CREATE TABLE "F_Operating_Expense
Set ERwinTableDef = ERwinDatabase.CreateTableDef("F_Operating_Expense"
Set ERwinField = ERwinTableDef.CreateField("f_operating_expense_id", DB_INTEGER)
 
This is code that should be in a module. Create as a
function in a module. Then, you can create a macro to run
the function.
-----Original Message-----
I am trying to create tables using sample scripts
below... could someone point me to where I populate this
into Access DB.
Much Appreciated!
-Lawrence

Dim ERwinWorkspace As Workspace
Dim ERwinDatabase As Database
Dim ERwinTableDef As TableDef
Dim ERwinField As Field
Dim ERwinRelation As Relation
Set ERwinWorkspace = DBEngine.Workspaces(0)
Set ERwinDatabase = ERwinWorkspace.OpenDatabase (sERwinDatabase)
' DELETE TABLE "F_Operating_Expense"
ERwinDatabase.TableDefs.Delete "F_Operating_Expense"
' CREATE TABLE "F_Operating_Expense"
Set ERwinTableDef = ERwinDatabase.CreateTableDef ("F_Operating_Expense")
Set ERwinField = ERwinTableDef.CreateField
("f_operating_expense_id", DB_INTEGER)
 
Back
Top