Author: dougancil | Posted on: 10/12/2010 2:07:38 PM | Views : 274

I have the following default.aspx.vb
Imports System.Data.SqlClient Imports System.Data Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click InsertRow() End Sub Public Sub InsertRow() Dim myConnectionString As String = "Initial Catalog=mdr;Data Source=xxxxxxx;uid=xxxxxx;password=xxxxxxxx;" Dim myConnection As New SqlConnection(myConnectionString) Dim commandText As String = _ "insert into Exceptions (employeenumber, exceptiondate, starttime, endtime, duration, code, approvedby) " & _ "values(@employeenumber, @exceptiondate, @starttime, @endtime, @duration, @code, @approved)" Using connection As New SqlConnection(myConnectionString) Dim command As New SqlCommand(commandText, connection) command.Par ...

Go to the complete details ...