help connecting visual basic with sql server
i need to connect a visual basic 2010 express application with the sql server database which runs our business one application, any ideas how i do this?
Matthias Bucher replied
you can use the most generic connection object ODBC.
This is an example from MS to connect to a dataset by code
' Visual Basic
Public Sub ConnectToOdbc()
Dim conn As New System.Data.Odbc.OdbcConnection
' TODO: Modify the connection string and include any
' additional required properties for your database.
conn.ConnectionString = & _
"FIL=MS Access;DSN=valid data source name"
' Insert code to process data.
Catch ex As Exception
MessageBox.Show("Failed to connect to data source")
But you'll typically NEVER EVER connect to productive SAP system's database directly. No one would allow that.
There are "official" ways to gather data out of the SAP systems like SAP NetWeaver Gateway as an generic approach.