please can some one help me on how to connect different vb applications to a database accessing data from one database by different applications...

Recommended Answers

All 4 Replies

Here is a good resource:

And here is some sample code for connecting to a MySql database.

Imports MySql.Data.MySqlClient

Module Module1

   Sub Main()
      Dim csb As New MySqlConnectionStringBuilder
      csb.UserID = "user"
      csb.Password = "pswd"
      csb.Server = "10.xx.xx.xx"
      csb.Database = "DB_NAME"

      Dim strSQL As String = "select COMMENTS from audit where ELEMENT='ZZZ630'"

      Dim conn As New MySqlConnection(csb.ToString())

      Dim cmd As New MySqlCommand(strSQL, conn)
      Dim rdr As MySqlDataReader = cmd.ExecuteReader()

      While rdr.Read()
      End While

   End Sub

End Module

What database are you making use of?

check here for connection strings

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.