Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Can't call Stored Proc... How to trace Flow of Web Application in VB.NET?

Reply
Thread Tools

Can't call Stored Proc... How to trace Flow of Web Application in VB.NET?

 
 
Mo
Guest
Posts: n/a
 
      12-19-2003
Hi,


I have a webform which has vb.net code behind it and I would like it to
submit the entries in the fields into a sql server db using a stored
procedure. I have a central .vb file in my application that has all the
stored proc calls in it. in the Submit_Click Sub in my form.vb file, I
reference the function in my central .vb file which calls the stored proc.

The problem that I am having is that when I submit my form, it just reloads
the form minus all the values. The form is set to run at server. I would
like to trace my application to see if the form values are actually being
sent to my store proc function. I am new to .NET and I would greatly
appreciate any help.

Thank you kindly,

Muhsin


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      12-19-2003
Either bind each time (not just in 'If Not Page.IsPostBack Then'), or make
sure ViewState is turned on.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Mo" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
>
> I have a webform which has vb.net code behind it and I would like it to
> submit the entries in the fields into a sql server db using a stored
> procedure. I have a central .vb file in my application that has all the
> stored proc calls in it. in the Submit_Click Sub in my form.vb file, I
> reference the function in my central .vb file which calls the stored proc.
>
> The problem that I am having is that when I submit my form, it just

reloads
> the form minus all the values. The form is set to run at server. I would
> like to trace my application to see if the form values are actually being
> sent to my store proc function. I am new to .NET and I would greatly
> appreciate any help.
>
> Thank you kindly,
>
> Muhsin
>
>



 
Reply With Quote
 
 
 
 
Thiago Temple
Guest
Posts: n/a
 
      12-19-2003
You should use some breakpoints to debug it


"Mo" <(E-Mail Removed)> escreveu na mensagem
news:%(E-Mail Removed)...
> Hi,
>
>
> I have a webform which has vb.net code behind it and I would like it to
> submit the entries in the fields into a sql server db using a stored
> procedure. I have a central .vb file in my application that has all the
> stored proc calls in it. in the Submit_Click Sub in my form.vb file, I
> reference the function in my central .vb file which calls the stored proc.
>
> The problem that I am having is that when I submit my form, it just

reloads
> the form minus all the values. The form is set to run at server. I would
> like to trace my application to see if the form values are actually being
> sent to my store proc function. I am new to .NET and I would greatly
> appreciate any help.
>
> Thank you kindly,
>
> Muhsin
>
>



 
Reply With Quote
 
Mo
Guest
Posts: n/a
 
      12-19-2003
Hi,

I tried the System.Diagnostics.Trace.WriteLine command to check my form
values before being sent to the stored procedure, but i don't see any
output still. The form just reloads. Here is my vb code for the
submit_click sub:

Private Sub Submit_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles submit.Click
Dim objUpload As ASPUPLOADLib.IUploadManager
objUpload = New ASPUPLOADLib.UploadManager()
Dim objFile As ASPUPLOADLib.IUploadedFile
Dim File, item, ThisType, Size, ID
Dim datapath
If Len(Request.QueryString("fileID")) > 0 Then
ID = Request.QueryString("fileID")
Else
ID = 0
End If
If docType.SelectedItem.Value = "--- Select a Type ---" Then
ThisType = ""
Else
ThisType = docType.SelectedItem.Value
End If

If Request("edit") = "true" Then
Dim UpdateDocRoom As New DocRoomMain()
Dim IsSuccessful As Integer =
UpdateDocRoom.UpdateDocument(ID, Session("projectID"), docDate.Text,
toCompany.Text, toPerson.Text, fromCompany.Text, fromPerson.Text,
subject.Text, reference.Text, ThisType, keywords.Text, filePath.Text,
fileName.Text, docSize.Text)

If IsSuccessful < 1 Then
Response.Write("Update has been unsuccessful")
End If
Else
datapath = ConfigurationSettings.AppSettings("DataPath") &
Session("companyName") & "\" & projectName.Text & "\DocRoom"
objUpload.OverwriteFiles = False
Dim Count As Integer = objUpload.Save(datapath,
Missing.Value, Missing.Value)
If Count > 0 Then
Dim UpdateDocRoom As New DocRoomMain()
For Each objFile In objUpload.Files
File = objFile.ExtractFileName
Size = objFile.Size()
Next
'********** TRACING AREA ****************************
' Test All Form Values
System.Diagnostics.Trace.WriteLine("Company Name: " +
toCompany.Text)

' Call Stored Procedure
Dim IsSuccessful As Integer =
UpdateDocRoom.AddDocument(ID, Session("projectID"), docDate.Text,
toCompany.Text, toPerson.Text, fromCompany.Text, fromPerson.Text,
subject.Text, reference.Text, ThisType, keywords.Text, filePath.Text,
fileName.Text, docSize.Text)

'********** TRACING AREA ****************************

If IsSuccessful < 1 Then
Response.Write("File Not Uploaded. Failure at
Database level. Please Try Again.")
End If
End If
End If
End Sub

"Cowboy (Gregory A. Beamer)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Either bind each time (not just in 'If Not Page.IsPostBack Then'), or make
> sure ViewState is turned on.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ************************************************** ********************
> Think Outside the Box!
> ************************************************** ********************
> "Mo" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi,
> >
> >
> > I have a webform which has vb.net code behind it and I would like it to
> > submit the entries in the fields into a sql server db using a stored
> > procedure. I have a central .vb file in my application that has all the
> > stored proc calls in it. in the Submit_Click Sub in my form.vb file, I
> > reference the function in my central .vb file which calls the stored

proc.
> >
> > The problem that I am having is that when I submit my form, it just

> reloads
> > the form minus all the values. The form is set to run at server. I

would
> > like to trace my application to see if the form values are actually

being
> > sent to my store proc function. I am new to .NET and I would greatly
> > appreciate any help.
> >
> > Thank you kindly,
> >
> > Muhsin
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query:difference between node flow and filter flow in java's I/O,system? Jack Dowson Java 0 05-07-2007 03:35 PM
trace.axd and asp.net trace feature IIS only? Jiho Han ASP .Net 0 08-22-2006 12:44 PM
How to redirect output from Diagnostics.Trace to Page.Trace? Matthias S. ASP .Net 1 11-30-2005 09:01 AM
Trace: Can anyone suggest a good tool to catch trace messages? Rukmal Fernando ASP .Net 4 10-27-2003 09:03 PM



Advertisments