Private Sub AddNewRegistry() Dim strInsSQL As String Dim RegistrantUID, iRegistryType As Integer Dim datEvent As DateTime RegistrantUID = DeCrypt(Session("RegistrantUID")) iRegistryType = cboRegistryTypes.Items(cboRegistryTypes.SelectedIndex).Value datEvent = txtEventDate.Text strInsSQL = "INSERT INTO Registry (RegistryName, RegistryDesc, EventDate, RegType_ID, Registrant_ID) " & _ "Values ('" & _ txtRegistryName.Text.Trim & "', '" & _ txtRegistryDesc.Text.Trim & "', Cast(" & _ datEvent & " as datetime) , " & _ iRegistryType & ", " & _ RegistrantUID & ")" Dim oCn As New SqlConnection(SQLcn.ConnectionString.ToString) Dim dbComm As New SqlCommand(strInsSQL, oCn) oCn.Open() dbComm.ExecuteNonQuery() oCn.Close() ClearRegistryEntry() 'BindGrid(Session("SORTFIELD"))3 End Sub
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams