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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Je ne parviens pas a faire fonctionner la chose.....
Public Function strReturn(ByVal inamexxx As String, ByVal inameyy As String) As String
On Error GoTo ErrorHandler
Dim result As String
Dim objDataBaseConnection As New ADODB.connection
Dim P1 As New ADODB.Parameter
Dim P2 As New ADODB.Parameter
Dim P3 As New ADODB.Parameter
Dim cmd As New ADODB.Command
objDataBaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\bdd1.mdb"
objDataBaseConnection.Open
With cmd
Set .ActiveConnection = objDataBaseConnection
.CommandType = adCmdStoredProc
.CommandText = "pfstrReturn_Group_Ptc"
.Prepared = True
End With
Set P1 = cmd.CreateParameter(Name:="inamesymbol", Type:=adChar, direction:=adParamInput, Size:=7, Value:=inamesymbol)
Set P2 = cmd.CreateParameter(Name:="inamefamily", Type:=adChar, direction:=adParamInput, Size:=10, Value:=inamefamily)
Set P3 = cmd.CreateParameter(Name:="iresult", Type:=adChar, direction:=adParamOutput, Size:=10, Value:=result)
cmd.Parameters.Append P1
cmd.Parameters.Append P2
cmd.Parameters.Append P3
cmd.Execute '<- il plante ici....
'.
'.
'.
'.
'.
'.
gfstrReturn_Group_PTC = result
Exit Function
ErrorHandler:
If Err.Number <> 0 Then
Call gflngDisplayMessage(39, enuErrorMessage, inamesymbol)
'Erase ostrArrArray
Err.Clear
End If
Resume Next
End Function |
Partager