Does anyone have sample code to create a database object, create a
dataset and step through it in Access 2000?
Set wks = DBEngine.CreateWorkspace(This, That, TheOther)
Set db = wks.CreateDatabase("c:\This.mdb", That, TheOther)
strSQL = "CREATE TABLE Test ( " & _
"TestNumber INTEGER NOT NULL CONSTRAINT pk PRIMARY KEY, " & _
"TestThing VARCHAR(12) NOT NULL " & _
")"
db.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO Test (TestNumber, TestThing) " & _
"VALUES (1, ""Eric"");"
db.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO Test (TestNumber, TestThing) " & _
"VALUES (2, ""Samantha"");"
db.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO Test (TestNumber, TestThing) " & _
"VALUES (3, ""Bristol"");"
db.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO Test (TestNumber, TestThing) " & _
"VALUES (4, ""Literacy"");"
db.Execute strSQL, dbFailOnError
Does that help?
Tim F