___________________________________
VB:
Public Sub TryVB()
Try
Dim cmm As New System.Data.SqlClient.SqlCommand
cmm.Parameters.Add("@p1", SqlDbType.Int) '注意敲完"@p1"后按一下上箭头再输入","号
Catch ex As Exception
MessageBox.Show(ex.Message, "Caption", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2, MessageBoxOptions.ServiceNotification)
End Try
End Sub