Hi all, not too sure on how to craft this sql, I want to insert into an access database on a share path, from another access database on a share path, in vb.net using
I cant seem to get the syntax right, does anyone have an example of that?
Code:
Dim cmd As OleDbCommand = New OleDbCommand()
Dim sConStr As String = "Provider=Microsoft.jet.oledb.4.0;data source=localdb"
Dim conn As OleDbConnection
conn = New OleDbConnection(sConStr)
cmd.Connection = conn
cmd.CommandType = CommandType.Text
cmd.CommandText = "SQL GOES HERE" 'INSERT INTO localdb SELECT table1 from DB2 ?
conn.Open()
cmd.ExecuteNonQuery() 'this should execute the sql to add the table
conn.Close()