database properties and making databases replicable 
Author Message
 database properties and making databases replicable


I have a problem with the program below. When I execute it my VB
crashes when I execute the line
     Debug.Print dbs.Properties(9).Value 'crashes here !!!!!!

The count prints 10, The name of the 9th property is DesignMasterId

The real problem I have is to make the database replicable. Note that
the examples in the help files and the Books online differ. VB crashes
on the Append statement.

The environment is Windows95, Visual Basic 4.0(32).

Can anyone give me a clue ?



Option Explicit

Private path As String
Private Sub Form_Load()
    Dim db As Database

    path = "d:\pbu\helpdesk\engineer interface\master.mdb"
    Set db = DBEngine(0).CreateDatabase(path, dbLangDutch)
    doit path

End Sub
Sub doit(strTargetDB)
    Dim dbs As Database
    Dim prop As Property
    ' Open database in exclusive mode.
    Set dbs = DBEngine(0).OpenDatabase(strTargetDB, True)
    ' Create property called "Replicable" and set to True.
    Debug.Print dbs.Properties.Count   'prints 10
    Debug.Print dbs.Properties(9).Name 'prints DesignMasterID
    Debug.Print dbs.Properties(9).Value 'crashes here !!!!!!

    Set prop = dbs.CreateProperty("Replicable", dbText, _
    dbs.Properties.Append prop
            ' Makes the DB replicable.
End Sub

Tue, 02 Feb 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Replicable Access Database's

2. Making a database based on SQL search in another database

3. Replicable Property?

4. Database properties in Database Model Diagram

5. Making the access database case sensitive

6. Making new Database

7. Making a function available from any database

8. Making Access Database Print Letters with Dates in Spanish

9. Making an apllication for an ACCESS97 Database.

10. HELP: Printing error makes database tables dissapear

11. Passwording a Access7 Database made simple

12. Making UNBOUND objects react to database


Powered by phpBB® Forum Software