Hello,
I have been programming in Access with VBA and jetSQL for years and I am making the leap to VB.net so I apologize for my ignorance up front.
I have a stand alone database with a table named "tbl_Settings". I am trying to make a connection to this table to run a SQL statement. I have looked around trying to find a good example how to do this with no luck. Below is th code I got thus far:
-----------------------------------------------------------------------------------------
Dim con As New OleDb.OleDbConnection(strConn) 'set connection
Dim cmdSQL As IDbCommand = con.CreateCommand() 'create a new command
Dim strSQL As String = "SELECT Source_Drive FROM tbl_Settings" 'Create query
cmdSQL.CommandText = strSQL 'bind the command to execute the max query
con.Open() 'Open connection
'WHAT SYNTAX IS USED TO EXECUTE THIS QUERY?
con.Close() 'Close connection
-----------------------------------------------------------------------------------------
I need help on the bold area's of this post.
Thank you in advance.
I have been programming in Access with VBA and jetSQL for years and I am making the leap to VB.net so I apologize for my ignorance up front.
I have a stand alone database with a table named "tbl_Settings". I am trying to make a connection to this table to run a SQL statement. I have looked around trying to find a good example how to do this with no luck. Below is th code I got thus far:
-----------------------------------------------------------------------------------------
Dim con As New OleDb.OleDbConnection(strConn) 'set connection
Dim cmdSQL As IDbCommand = con.CreateCommand() 'create a new command
Dim strSQL As String = "SELECT Source_Drive FROM tbl_Settings" 'Create query
cmdSQL.CommandText = strSQL 'bind the command to execute the max query
con.Open() 'Open connection
'WHAT SYNTAX IS USED TO EXECUTE THIS QUERY?
con.Close() 'Close connection
-----------------------------------------------------------------------------------------
I need help on the bold area's of this post.
Thank you in advance.