Torna al Thread

Public Function FE_inserisci_protocollo(ByVal data As String, ByVal divisione As Integer, ByVal reparto As Integer, ByVal tipologia As Integer, ByVal mittente As String, ByVal note As String, ByVal scelta As String, ByVal id_utente As Integer) Dim param As SqlParameter Dim open_conn As New connessione Dim con_db As SqlConnection = open_conn.apertura If con_db.State = ConnectionState.Closed Then con_db.Open() End If Dim comando As SqlClient.SqlCommand = con_db.CreateCommand Try comando.CommandType = CommandType.StoredProcedure comando.CommandText = "FE_ins_protocollo" comando.Parameters.Add("@data", SqlDbType.VarChar).Value = data comando.Parameters.Add("@divisione", SqlDbType.Int).Value = divisione comando.Parameters.Add("@reparto", SqlDbType.Int).Value = reparto comando.Parameters.Add("@tipologia", SqlDbType.Int).Value = tipologia comando.Parameters.Add("@mittente", SqlDbType.VarChar).Value = mittente comando.Parameters.Add("@note", SqlDbType.VarChar).Value = note comando.Parameters.Add("@scelta", SqlDbType.Int).Value = scelta comando.Parameters.Add("@id_utente", SqlDbType.Int).Value = id_utente param = comando.Parameters.Add(New SqlParameter("@stringa", SqlDbType.VarChar)) param.Direction = ParameterDirection.Output comando.ExecuteNonQuery() codice_protocollo = param.Value Finally con_db.Close() comando = Nothing End Try End Function
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5