• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The Unbound Form

The form used in the first example utilizes a public ADO connection object. This object initializes when the form loads and remains in memory as long as the application is running. You will need to evaluate whether it is more efficient to re-establish the connection repeatedly or to maintain the public connection. Generally, if there are fewer users, the approach shown in this example (a public connection) is more efficient. This is because Access does not need to connect to the server repeatedly. As the number of users increases, you may find that the public connection utilizes excessive server resources. You would then modify the code to have each event routine establish its own local connection.

The code in Listing 13.1 uses the Open method of the Connection object to establish a connection to the NorthWind database on the 5000Alison server. Notice that the code supplies the user ID and password. As an alternative, you could use integrated security to establish the connection.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint