1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Set cnnLiv = New ADODB.Connection
With cnnLiv
.Open ConnectStringBDLiv()
.CommandTimeout = 0
.CursorLocation = adUseClient
End With
strSQLLiv = "SELECT idlivraison, contrat, produit, usine, amount, dateprod, dateliv, clients, address, ville, capacite, trailer, ordre, periode, duree, camionneur, statut, dateretour, " & _
"commentaire, cod, qtepaquet, fenetre, statutcod, livisconfirm, manuel " & _
"FROM livraison " & _
"WHERE dateliv = '" & dateliv & "'"
Set rsLiv = New ADODB.Recordset
With rsLiv
.CursorLocation = adUseClient
.Open strSQLLiv, cnnLiv, adOpenStatic, adLockReadOnly
If Not .RecordCount = 0 Then
.MoveFirst
End If
End With
Private Function ConnectStringBDLiv() As String
ConnectStringBDLiv = "Driver={MySQL ODBC 3.51 Driver};Server=xxx;Database=xxxx;User=xxx; Password=xxx;Option=3;"
End Function |
Partager