note:
the last var UTENTE_CORRENTE in this case is blank
APRI and A_ORA are datetime
USER and NOMINATIVO are Varchar
my conn:
Option Explicit
Public Function connectMysql(USERNAME As String, PASSWD As String, SERVERIP As String, DB As String, CONN As ADODB.Connection, RS As ADODB.Recordset)
Set CONN = New ADODB.Connection
With CONN
.CommandTimeout = 999999
.ConnectionTimeout = 999999
.Mode = adModeReadWrite
.CursorLocation = adUseClient
.ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & SERVERIP & ";UID=" & USERNAME & ";PWD=" & PASSWD & ";DATABASE=" & DB & ";" & _
"OPTION=3"
.Open
End With
End Function
Sub INIZIO1()
If CONN Is Nothing Then
Call connectMysql("root", "sal21", "127.0.0.1", "BT", CONN, RS)
End If
What data type is your APRI column? CURDATE() should insert the date into the date column in the correct format. I know Toad for mySQL reformats the data to mm/dd/yyyyy HH:MM:SS.
If you want to type in a date just wrap it in qoutes like this -> '2013-03-22'