B
Brad Markisohn
I'm modifying a VB.Net application that uses an Access DB for parameter and
data storage. I've had to make a DB schema change and, in order to maintain
backwards comapatibility, I would like to add a new row to a specific table
in the DB if it doesn't exist. I'm using an OLEDABConnection object, but
I'm not familiar enough with SQL to know the verbiage to add the new row.
Can any body help me with this? Here's a snipit of the code:
Public Sub InsertARow()
Dim myConnection As New OleDbConnection(mstrConnectionString)
Dim myInsertQuery As String = QUERY TO ADD ROW GOES HERE
Dim myCommand As New OleDbCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
TIA
Brad
data storage. I've had to make a DB schema change and, in order to maintain
backwards comapatibility, I would like to add a new row to a specific table
in the DB if it doesn't exist. I'm using an OLEDABConnection object, but
I'm not familiar enough with SQL to know the verbiage to add the new row.
Can any body help me with this? Here's a snipit of the code:
Public Sub InsertARow()
Dim myConnection As New OleDbConnection(mstrConnectionString)
Dim myInsertQuery As String = QUERY TO ADD ROW GOES HERE
Dim myCommand As New OleDbCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
TIA
Brad