Below is my code. Getting Argument Exception(see subject) at "Using connection....." line. Looks like the connectionString is causing it but I can't see anything wrong with the string. This is the string: "C:\T&NDevelop\EFTPS_Access_TestSQL__App.vbp\database6.accdb\"
Where might I look?
Public Sub InsertRow(ByVal connectionString As String, _
ByVal insertSQL As String)
Using connection As New OleDbConnection(connectionString)
' The insertSQL string contains a SQL statement that
' inserts a new row in the source table.
Dim command As New OleDbCommand(insertSQL)
' Set the Connection to the new OleDbConnection.
command.Connection = connection
' Open the connection and execute the insert command.
Try
connection.Open()
command.ExecuteNonQuery()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
' The connection is automatically closed when the
' code exits the Using block.
End Using
End Sub
Tom
tnfaxpay