I'm trying to create a new db and table, but for some reason I'm getting this error "[Microsoft][ODBC driver manager]datasource name not found and no driver specified"
i click ok then i get the error "runtime error 91" "object variable or with block variable not set"
this is my code so far
Dim catAccess As New adox.Catalog
Dim tblDraft As New adox.Table
Dim cnnAccess As New ADODB.Connection
Dim rstDraft As New ADODB.Recordset
catAccess.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nhl2003.mdb;Jet OLEDB:Engine Type=4;"
catAccess.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nhl2003.mdb"
tblDraft.Name = "tblDraft"
tblDraft.Columns.Append ("Num"
, adWChar, 10
tblDraft.Columns.Append ("Participant"
, adWChar, 25
tblDraft.Columns.Append ("Player"
, adLongVarWChar, 400
catAccess.Tables.Append tblDraft
' this is where i get the second error
intRecNum = frmNewDraft.adoDraft.Recordset.RecordCount
any help would be appreciated
nuqe
We all know about the "stupid user" don't we...
i click ok then i get the error "runtime error 91" "object variable or with block variable not set"
this is my code so far
Dim catAccess As New adox.Catalog
Dim tblDraft As New adox.Table
Dim cnnAccess As New ADODB.Connection
Dim rstDraft As New ADODB.Recordset
catAccess.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nhl2003.mdb;Jet OLEDB:Engine Type=4;"
catAccess.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nhl2003.mdb"
tblDraft.Name = "tblDraft"
tblDraft.Columns.Append ("Num"
tblDraft.Columns.Append ("Participant"
tblDraft.Columns.Append ("Player"
catAccess.Tables.Append tblDraft
' this is where i get the second error
intRecNum = frmNewDraft.adoDraft.Recordset.RecordCount
any help would be appreciated
nuqe
We all know about the "stupid user" don't we...