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
| Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rec As New ADODB.Recordset
cnn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=xxx\xxx;User ID=xxx;Password=xxx;Trusted_Connection=False"
cmd.ActiveConnection = cnn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "mabase.dbo.sps_AddUser"
cmd.Parameters.Append cmd.CreateParameter("@ID", adGUID, adParamOutput, 36, Uid)
cmd.Parameters.Append cmd.CreateParameter("@GRP_ID", adGUID, adParamInput, 36, "55555555-5555-5555-5555-555555555555")
cmd.Parameters.Append cmd.CreateParameter("@CREATEUR", adVarChar, adParamInput, 255, "support")
cmd.Parameters.Append cmd.CreateParameter("@DATE_CREATION", adDate, adParamInput, 10, "30/09/2011")
cmd.Parameters.Append cmd.CreateParameter("@USR_LOGIN", adVarChar, adParamInput, 255, "moi")
cmd.Parameters.Append cmd.CreateParameter("@USR_PWD", adVarChar, adParamInput, 255, "PKYPn9BxBmaKnK1mKjCMZQ==")
cmd.Parameters.Append cmd.CreateParameter("@USR_MAIL", adVarChar, adParamInput, 255, "demo@demo.com")
cmd.Parameters.Append cmd.CreateParameter("@USR_PRENOM", adVarChar, adParamInput, 50, "Robert")
cmd.Parameters.Append cmd.CreateParameter("@USR_NOM", adVarChar, adParamInput, 50, "Dupont")
cmd.Parameters.Append cmd.CreateParameter("@ENV_ID", adGUID, adParamInput, 36, "36cf3fd6-9962-4d10-a34a-b2ee4fae6986")
cmd.Parameters.Append cmd.CreateParameter("@USR_GROUPE_Ids", adVarChar, adParamInput, 36, "55555555-5555-5555-5555-555555555555")
cmd.Parameters.Append cmd.CreateParameter("@USR_GROUPE_PRINCIPAL", adGUID, adParamInput, 2048, "55555555-5555-5555-5555-555555555555")
cmd.Parameters.Append cmd.CreateParameter("@IS_ADMIN", adBoolean, adParamInput, 1, False)
cmd.Parameters.Append cmd.CreateParameter("@IS_ALLOWED_SENDING_MAIL", adBoolean, adParamInput, 1, True)
cmd.Parameters.Append cmd.CreateParameter("@IS_ALLOWED_MANAGE_USER", adBoolean, adParamInput, 1, False)
cmd.Parameters.Append cmd.CreateParameter("@IS_FILTERED", adBoolean, adParamInput, 1, False)
cmd.Parameters.Append cmd.CreateParameter("@DEFAULT_PAGE_ID", adGUID, adParamInput, 36, "22222222-2222-2222-2222-222222222222")
rec.Open cmd, , adOpenDynamic, adLockReadOnly |
Partager