A
Alfred Malleier
Hello,
I have big problem on updating an Access Memo field with OleDb. While the
InsertCommand works, then UpdateCommand raises an exception: Syntaxerror in
UPDATE-Statement. I tryed various work arounds (the last 3 days) with and
without the CommandBuilder with allways the same result.
The last attempt was:
Public Function WriteMemoToAccess(ByVal Pars As String) As Boolean
'Parameters is the ColumnName of the Access Memo field
Dim AccessCommand As New OleDb.OleDbCommand("UPDATE DocH SET Parameters=?
WHERE IdNum = 1")
Dim QueryParameter As New OleDb.OleDbParameter("@Parameters", _
OleDb.OleDbType.LongVarWChar, Len(Pars), ParameterDirection.Input,
True, _
Nothing, Nothing, Nothing, DataRowVersion.Current, Pars)
AccessCommand.Parameters.Add(QueryParameter)
AccessCommand.Connection = Me.Connection
Me.Connection.Open()
Try
AccessCommand.ExecuteNonQuery()
WriteMemoToAccess = True
Catch ex As Exception
End Try
Me.Connection.Close()
End Function
Is there a way to do this??
Best regards
Alfred Malleier
(South Tyrol)
I have big problem on updating an Access Memo field with OleDb. While the
InsertCommand works, then UpdateCommand raises an exception: Syntaxerror in
UPDATE-Statement. I tryed various work arounds (the last 3 days) with and
without the CommandBuilder with allways the same result.
The last attempt was:
Public Function WriteMemoToAccess(ByVal Pars As String) As Boolean
'Parameters is the ColumnName of the Access Memo field
Dim AccessCommand As New OleDb.OleDbCommand("UPDATE DocH SET Parameters=?
WHERE IdNum = 1")
Dim QueryParameter As New OleDb.OleDbParameter("@Parameters", _
OleDb.OleDbType.LongVarWChar, Len(Pars), ParameterDirection.Input,
True, _
Nothing, Nothing, Nothing, DataRowVersion.Current, Pars)
AccessCommand.Parameters.Add(QueryParameter)
AccessCommand.Connection = Me.Connection
Me.Connection.Open()
Try
AccessCommand.ExecuteNonQuery()
WriteMemoToAccess = True
Catch ex As Exception
End Try
Me.Connection.Close()
End Function
Is there a way to do this??
Best regards
Alfred Malleier
(South Tyrol)