473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Help with Webforms

Ken
Hello,

I have a webform that gets a record from SQL Server by using a stored
procedure.
The stored procedure uses 3 parameters in which after the record is found,
stored procedure #2 runs to update one of the columns called Status from
"incomplete" to "Pending"
Status is one of the parameters for stored procedure #1.
This all works fine, My problem is after the person is finished with the
record they then push the next button to get the next record.
Prior to gettting the next record I need it to execute stored procedure #3
to update the Status column from "Pending" to "Complete"
What it is doing is its getting the next record and then running stored
procedure #3 which causes the new record to be updated instead of the
previous.

Any help would be greatly appreciated!
CODE:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim cn As New ADODB.Connection
Dim Rs As ADODB.Recordset

cn.Open("Driver=SQL
Server;Server=xxxxx;Database=xxxxx;uid=xxxxx;pwd=x xxxx;")

Rs = New ADODB.Recordset
Rs.Open("Exec MyRecords" & "'" & Session("valType") & "'" & ", '" &
Session("valTC") & "'" & ", '" & Session("valLang") & "'", cn)
Session("valSerial") = Rs.Fields("Serial").Value

Dim RsPending As ADODB.Recordset
RsPending = New ADODB.Recordset
RsPending.Open("Exec StatusPending " & "'" & Session("valSerial") &
"'", cn, ADODB.CursorTypeEnum.adOpenKeyset,
ADODB.LockTypeEnum.adLockOptimistic)
lblSSN.Text = Rs.Fields("SSN").Value
lblBWE.Text = Rs.Fields("ProcDate").Value
lblDate.Text = Rs.Fields("ReceieveDate").Value
lblTime.Text = Rs.Fields("ProcessTime").Value
lblLang.Text = Rs.Fields("Language").Value
lblUser.Text = Rs.Fields("User").Value

End Sub
Private Sub btnNext_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnNext.Click
Dim objConn As SqlConnection = New SqlConnection("Data
Source=xxxxxxx;UID=xxxxx;PWD=xxxxx;")
Dim objStatusCompleteCMD As SqlCommand = New
SqlCommand("StatusComplete", objConn)
objStatusCompleteCMD.CommandType = CommandType.StoredProcedure

Dim PSerialNo As SqlParameter =
objStatusCompleteCMD.Parameters.Add("@Serial", SqlDbType.Char, 12)
PSerialNo.Value = Session("valSerial")

objConn.Open()

Dim myStatusC As SqlDataReader =
objStatusCompleteCMD.ExecuteReader()
myStatusC.Read()

myStatusC.Close()
myStatusC = Nothing

objConnStatus.Close()
objConnStatus = Nothing

End Sub

Jul 21 '05 #1
1 1286
JEP
Cool question Ken, you are obviously a guru. I don't have a clue as to an answer for you. But, you could answer my question, one below yours re: SQLDataAdapter.Update. That way, Karma will have somebody give you a good answer fast.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
1
by: Paul R | last post by:
Hi, I have a Winforms application that access some SQLServer2000 stored procedures. I have now written some new Webforms pages to use some of the same stored procs. The Webforms use the SAME...
3
by: Netserver | last post by:
Hi have a question hope there is a simple answer. I want to enter data in to 2 arrays from several webforms in project and be able to recall that data from any of the webforms, other then using a...
3
by: | last post by:
All the fields in webforms are automatically declared as protected. If I change them to public, they are converted back to protected. Why is this happening ? Thanks
20
by: Martin Rosén-Lidholm | last post by:
Although an impossible question to answer, I fell urged to raise it anyhow. Given a fairly complex ERP application scenario, what's your estimation for the X-ratio dev. time for...
2
by: Piotr Karwatka | last post by:
Hi! I have a little problem an qeustion. In .NET Windows Forms I can do something like that: - i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd form I have Button1...
0
by: Joergen Bech | last post by:
Trying to implement my own webforms designer to be hosted in a WinForms environment. Basically: I know that mshtml is used in the VS.Net 2003 WebForms designer, but the HTML behind the scenes is...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
5
by: dwight | last post by:
Hi all First - I apologise if anyone recognises this from a previous post but I never worded what I wanted to know properly and getting quick advice is imperative to me now. In future I will...
5
by: Bit byte | last post by:
Can I use C# (Winforms) to design a website?. I am from C/C++ background but know nothing about Internet programming. My understanding of WebForms are that they are similar to WinForms in that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.