J
JJ297
After a user adds their name, address etc to a form and hit the submit
button an email is generated to go to someone to update the database.
This is what's being sent and works fine:
Dim ocdoEmail As New Object
ocdoEmail = Server.CreateObject("CDO.Message")
ocdoEmail.To = Session("GetEmail")
ocdoEmail.From = Session("GetEmail")
ocdoEmail.Subject = "Training Resource Material Request"
ocdoEmail.HTMLBody = "<a href=""http://seb2a54/traininglibrary/
FillRequest.aspx?RequestorID=" & x & """>Click link to fill out the
training library resource request</a>"
ocdoEmail.send()
After clicking on the hyperlink you are taken to FillRequest.aspx with
some of the info displayed in a details view and then two text boxes
are displayed so the user can update ship date, and due date.
My problem is the two text boxes are not being updated in the
database. Can someone assist me don't know what I'm missing.
Here's my stored procedure to update the info:
CREATE procedure updateloanerinfo
@requestorid int,
@shipdate datetime,
@duedate datetime
AS update LibraryRequest
set
[shipdate] = @shipdate,
[duedate] = @duedate
where requestorid = @requestorid
GO
Here's fillrequest.aspx.vb code behind:
Protected Sub LoanRequest_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LoanRequest.Click
Dim conn As New
Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("TrainUserConnectionString").ConnectionString)
'add string
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
.Connection = conn 'the connection
.CommandType = Data.CommandType.StoredProcedure
.CommandText = "UpdateloanerInfo"
.Parameters.AddWithValue("@shipdate", ShipDateTxt.Text)
.Parameters.AddWithValue("@duedate", DueDateTxt.Text)
End With
Try
conn.Open()
cmd.ExecuteNonQuery()
Catch ex As Data.SqlClient.SqlException
Finally
conn.Dispose()
End Try
End Sub
button an email is generated to go to someone to update the database.
This is what's being sent and works fine:
Dim ocdoEmail As New Object
ocdoEmail = Server.CreateObject("CDO.Message")
ocdoEmail.To = Session("GetEmail")
ocdoEmail.From = Session("GetEmail")
ocdoEmail.Subject = "Training Resource Material Request"
ocdoEmail.HTMLBody = "<a href=""http://seb2a54/traininglibrary/
FillRequest.aspx?RequestorID=" & x & """>Click link to fill out the
training library resource request</a>"
ocdoEmail.send()
After clicking on the hyperlink you are taken to FillRequest.aspx with
some of the info displayed in a details view and then two text boxes
are displayed so the user can update ship date, and due date.
My problem is the two text boxes are not being updated in the
database. Can someone assist me don't know what I'm missing.
Here's my stored procedure to update the info:
CREATE procedure updateloanerinfo
@requestorid int,
@shipdate datetime,
@duedate datetime
AS update LibraryRequest
set
[shipdate] = @shipdate,
[duedate] = @duedate
where requestorid = @requestorid
GO
Here's fillrequest.aspx.vb code behind:
Protected Sub LoanRequest_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LoanRequest.Click
Dim conn As New
Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("TrainUserConnectionString").ConnectionString)
'add string
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
.Connection = conn 'the connection
.CommandType = Data.CommandType.StoredProcedure
.CommandText = "UpdateloanerInfo"
.Parameters.AddWithValue("@shipdate", ShipDateTxt.Text)
.Parameters.AddWithValue("@duedate", DueDateTxt.Text)
End With
Try
conn.Open()
cmd.ExecuteNonQuery()
Catch ex As Data.SqlClient.SqlException
Finally
conn.Dispose()
End Try
End Sub