'_________________________________________________________________________________________ ' D E C L A R E S . V B ' Created 1/17/07 ' Ron Kessler '_________________________________________________________________________________________ 'updated 1/17/07 'Notes: Be sure to use the imports statement to include this class where you are using these objects. In ' my case, it is in the MYADO.C# class. ' I declared the items as Shared so you do not need to instantiate an object in order to use them. ' This class could be added to my future projects and save me time. Be sure to change the connection ' string to suit your needs. Mine is saved in the app.config file. ' Also change the sqlString to fit your database Option Strict On Option Explicit On Imports System.Data.SqlClient ''' ''' Declares the ADO objects so they can be shared across the application. ''' ''' Public Class Declares Friend Shared myDataSet As New DataSet 'this is the only dataset I use in this app '---connection string is saved in the app.config file using the name you see in the next line Friend Shared connString As String = My.Settings.customers_05ConnectionString Friend Shared Conn As New SqlConnection(connString) Friend Shared sqlString As String = "SELECT * from Customers ORDER BY Name" Friend Shared dataAdapter As New SqlDataAdapter(sqlString, Conn) Friend Shared MSG_TITLE As String = "Laguna Cycle Works" 'used in all the message boxes End Class