Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Pls help me(Beginner in VB.net )
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 · ·