1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
'open connection
CONNECT = "Driver={ODBC Driver 13 for SQL Server};Server=tcp:xxx.database.windows.net,1433;Database=xxx;Uid=xxx;Pwd=xxx;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;"
oCx.ConnectionString = CONNECT
oCx.Open
Set oCmd = New ADODB.Command
With oCmd
.ActiveConnection = oCx
.CommandType = adCmdStoredProc
.CommandText = "dbo.PS_TIERS_DOSSIER"
.Parameters("@DS_NID").Value = var_session_dossier
Set oRst = oCmd.Execute
If oRst.EOF = False Then
Do While Not orst.EOF
Debug.Print oRst![TI_NID]
oRst.MoveNext
Loop
end if
End With
set Forms("FL_AF_TI001").Form.Recordset = oRst |
Partager