Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...If there has ever been a justification needed for access to the net during working hours, just referring to this site should suffice. Fantastic!..."

Geography

Where in the world do Tek-Tips members come from?

need help troubleshooting SQL Stored Proc. how to show values in vb code

DougP (MIS)
30 Jul 12 10:37
I have this VB code that runs a Stored Procedure. It is not doing anything but is not returning any error either. So I don't know what's not working. is there a way to see inside the parameters or to debug.print something?
If I run the SP in SSMS it works fine. so the SP seems to be OK.

CODE

Try
            cnn.Open()
            With cmd
                .Connection = cnn
                .CommandText = "sp_SOW_ManagerApproveTime"
                .CommandType = CommandType.StoredProcedure
                .Parameters.AddWithValue("WeekEndDate", Me.txtWeekEndingDate.Text)
                .Parameters(0).SqlDbType = SqlDbType.Date
                .Parameters.AddWithValue("Manager", Me.lblManagerName.Text)
                .Parameters(1).SqlDbType = SqlDbType.Char
                .Parameters.AddWithValue("ResourceLastName", TheFname)
                .Parameters(2).SqlDbType = SqlDbType.Char
                .Parameters.AddWithValue("ResourceFirstName", TheLname)
                .Parameters(3).SqlDbType = SqlDbType.Char
                ' execute Sp
                RetVal = .ExecuteScalar

            End With 

TIA

DougP

DougP (MIS)
30 Jul 12 11:49
Never mind I see that I am passing the first name to the last name parameter and Visa Versa
Dooh

CODE

.Parameters.AddWithValue("ResourceLastName", TheFname) 

DougP

jbenson001 (Programmer)
30 Jul 12 12:03
Just an FYI. If you do need to see what is being run, you can use SQL Server Management Studio.. Start SQL profiler, and you will see the SP being called, with what parameters, and parameter values.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close