Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Try this one

Status
Not open for further replies.

rombosiaj

Programmer
Jun 10, 2005
7
KE
Hi guys,
put this code on a command button and run it. if your Database won't be 49 Mb++ tell me the references you used coz mine is that big.Just re-align the lines below. Here goes:
Private Sub Command1_Click()
Dim intger As Integer
Dim cat As New ADOX.Catalog
Dim tabl As New ADOX.Table
Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset
'create a database and a table in it
cat.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb"
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb"
With tabl
.Name = "testtable"
.Columns.Append "col1", adVarWChar
.Columns.Append "col2", adVarWChar
End With
cat.Tables.Append tabl
Set tabl = Nothing
Set cat = Nothing

'create a connection to the Database the add data to it
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb"
rec.Open "testtable", con, adOpenDynamic, adLockOptimistic
For intger = 0 To 12000
rec.AddNew
rec!col1 = intger
rec!col2 = CStr(intger) & CStr(intger) 'anything to be inserted
Next intger
rec.Update
rec.Close
con.Close
Set rec = Nothing
Set con = Nothing
Unload Me
End Sub
 
424Kb when using ADO 2.1, ADO 2.6, ADO 2.7 or ADO 2.8 in conjunction with Ado Ext. 2.8 for DDL and Security
 
Using ADO 2.8 and ADOX 2.8 I get a file size around 450K

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Interesting.

45.1 MB initially and 436K after doing a compress on Win98SE.

424K on XP initially with no change after compression.

Both using ADO 2.8.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top