I am making a application having many forms on VB.net.
In every form I am using
[b]Dim con As MySqlConnection
Dim str As String
Dim cmd As MySqlCommand
Dim dr As MySqlDataReader
Dim pass As String[/b]
for database connection declaration
[b]con = New MySqlConnection
con.ConnectionString = connectionstring
'con = New MySqlConnectioncon.ConnectionString = Sample.connectionstring
Catch ex As Exception
MsgBox("connection not establisbed")
for connection establishment
Now My Problem
I want to make this access this snippets from a single class to all my forms. Is it Possible. Pls reply me immediately.
if possible send the code.
0 · ·