I am using ADO to add a record to a MySQL table. The code works fine, and the data is sent to a new record except userid. I canβt understand why.
'---------------------------------------------------------------------------------------
' Procedure : IPhpList_AddHistory
' Author : Adam
' Date : 12/8/2014
' Purpose : Add a history record to the phpList account.
'---------------------------------------------------------------------------------------
'
Private Sub IPhpList_AddHistory(cUser As clsUser, cHistory As clsHistory)
Dim strSQL As String
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
strSQL = "phplist_user_user_history limit 0,1"
rst.Open strSQL, oConn, adOpenDynamic, adLockOptimistic
With rst
.AddNew
.Update
.Close
End With
' Clear reference
Set rst = Nothing
End Sub
Seems pretty simple, but as a result of writing to MySQL there is no value userid.

There is an index in the column, but that doesn't seem to stop me from setting the value. (And no, there are no triggers in this table.)

When I look at the code, I see that the value for this field is set, and there are no errors when updating the record, but for some reason it just returns to zero when adding the record.
, .Execute(strSQL), , ADO .
, userid , . , ( ).
Update
... , ..... , . / userid. ( )
, , userid. ( ?)
, MySQL, ADO, . . ADO, .
INSERT INTO `test`.`phplist_user_user_history`(`id`,`userid`,`ip`,`date`,`summary`,`detail`,`systeminfo`)
VALUES (DEFAULT,DEFAULT,'',_binary'2014-12-18 11:51:13','My Subject','New Details','IBLP automated syncronization process. Version 1.0')
INSERT INTO `test`.`phplist_user_user_history`(`id`,`userid`,`ip`,`date`,`summary`,`detail`,`systeminfo`,`testcol`)
VALUES (DEFAULT,456,'',_binary'2014-12-18 13:22:44','My Subject','New Details','IBLP automated syncronization process. Version 1.0',1)
, insert DEFAULT I, ADO.
, , testcol. -, INT(11) ??

, , VBA ( userid):

. .Update , .
ββ ODBC? MySQL ODBC (5.3.4) :
"Driver=MySQL ODBC 5.3 Unicode Driver;SERVER=myserver;UID=myuser;PWD={mysecretpwd};DATABASE=test;PORT=3306;DFLT_BIGINT_BIND_STR=1"