Click here to Skip to main content
15,910,471 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to call web reference without adding webreference in asp.net 2.0 Pin
Michael Sync14-Feb-07 20:14
Michael Sync14-Feb-07 20:14 
Questionxls date time format Pin
yogesh m14-Feb-07 19:23
yogesh m14-Feb-07 19:23 
QuestionWeb set up problem Pin
mohd imran abdul aziz14-Feb-07 19:17
mohd imran abdul aziz14-Feb-07 19:17 
QuestionXML using XSL Pin
fmlove14-Feb-07 19:09
fmlove14-Feb-07 19:09 
AnswerRe: XML using XSL Pin
Walter_H15-Feb-07 1:43
Walter_H15-Feb-07 1:43 
Questionwebhost -- your opinion Pin
the pink jedi14-Feb-07 17:27
the pink jedi14-Feb-07 17:27 
AnswerRe: webhost -- your opinion Pin
Neeraj Arora14-Feb-07 18:14
Neeraj Arora14-Feb-07 18:14 
AnswerRe: webhost -- your opinion [modified] Pin
Michael Sync14-Feb-07 20:02
Michael Sync14-Feb-07 20:02 
Questionsession expires after file update... Pin
PandemoniumPasha14-Feb-07 17:16
PandemoniumPasha14-Feb-07 17:16 
AnswerRe: session expires after file update... Pin
Neeraj Arora14-Feb-07 18:17
Neeraj Arora14-Feb-07 18:17 
GeneralRe: session expires after file update... Pin
PandemoniumPasha14-Feb-07 20:34
PandemoniumPasha14-Feb-07 20:34 
QuestionQuestion about HeaderStyle in GridView Pin
xiao bin bin14-Feb-07 11:43
xiao bin bin14-Feb-07 11:43 
AnswerRe: Question about HeaderStyle in GridView Pin
Shajeel14-Feb-07 19:03
Shajeel14-Feb-07 19:03 
GeneralRe: Question about HeaderStyle in GridView Pin
xiao bin bin14-Feb-07 19:44
xiao bin bin14-Feb-07 19:44 
GeneralRe: Question about HeaderStyle in GridView Pin
Shajeel14-Feb-07 20:02
Shajeel14-Feb-07 20:02 
QuestionLabels and master pages Pin
mintajalepi14-Feb-07 10:19
mintajalepi14-Feb-07 10:19 
Questionasp.net-text editor Pin
luckyve14-Feb-07 8:18
luckyve14-Feb-07 8:18 
AnswerRe: asp.net-text editor Pin
Sylvester george14-Feb-07 19:26
Sylvester george14-Feb-07 19:26 
AnswerRe: asp.net-text editor Pin
M A A Mehedi Hasan14-Feb-07 19:59
M A A Mehedi Hasan14-Feb-07 19:59 
QuestionPage Classes Pin
DanB198314-Feb-07 7:41
DanB198314-Feb-07 7:41 
QuestionASP.NET 2.0 button click to perform 2 actions (client side e-mail then redirect to another page) Pin
bubberz14-Feb-07 6:31
bubberz14-Feb-07 6:31 
AnswerRe: ASP.NET 2.0 button click to perform 2 actions (client side e-mail then redirect to another page) Pin
Jesse Squire14-Feb-07 7:34
Jesse Squire14-Feb-07 7:34 
GeneralRe: ASP.NET 2.0 button click to perform 2 actions (client side e-mail then redirect to another page) Pin
Neeraj Arora14-Feb-07 17:23
Neeraj Arora14-Feb-07 17:23 
QuestionNo data being returned by the stored procedure. Pin
Quecumber25614-Feb-07 3:59
Quecumber25614-Feb-07 3:59 
Here is the subroutine I’m using to recover the employee’s information from the database.

Protected Sub Load_EmployeeInfo_To_Edit(ByVal intEmployeeID As Integer)
'Purpose: Loads the selected employee's information for editting
'Parameters: intEmployeeID as Integer; The Employee's ID number
'Returns: Nothing - populates the textboxes in the Employees.aspx page
Dim cn As SqlConnection = New SqlConnection(MRMFunctions.WebConfigConnString)
cn.Open()
Try
Dim cd As SqlCommand = New SqlCommand("mrmsp_RetrieveEmployeeForEditting", cn)
cd.CommandType = Data.CommandType.StoredProcedure
'Load the parameters from the stored procedure into the web form
'cd.Parameters.Add("@varEmployeeID", Data.SqlDbType.Int)
'cd.Parameters("@varEmployeeID").Direction = Data.ParameterDirection.InputOutput
cd.Parameters.Add("@varTitleID", Data.SqlDbType.Int)
cd.Parameters("@varTitleID").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varDeptID", Data.SqlDbType.Int)
cd.Parameters("@varDeptID").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varLName", Data.SqlDbType.NVarChar)
cd.Parameters("@varLName").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varFName", Data.SqlDbType.NVarChar)
cd.Parameters("@varFName").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varMI", Data.SqlDbType.NVarChar)
cd.Parameters("@varMI").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varAddrTypeID", Data.SqlDbType.Int)
cd.Parameters("@varAddrTypeID").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varAddress1", Data.SqlDbType.NVarChar)
cd.Parameters("@varAddress1").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varAddress2", Data.SqlDbType.NVarChar)
cd.Parameters("@varAddress2").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varCity", Data.SqlDbType.NVarChar)
cd.Parameters("@varCity").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varStateID", Data.SqlDbType.Int)
cd.Parameters("@varStateID").Direction = Data.ParameterDirection.Output
cd.Parameters.Add("@varZip", Data.SqlDbType.NVarChar)
cd.Parameters("@varZip").Direction = Data.ParameterDirection.Output

txtID.Text = CStr(intEmployeeID)
intTitleID = cd.Parameters("@varTitleID").Value
intDeptID = cd.Parameters("@varDeptID").Value
strLName = cd.Parameters("@varLName").Value
strFName = cd.Parameters("@varFName").Value
strMI = cd.Parameters("@varMI").Value
intAddrTypeID = cd.Parameters("@varAddrTypeID").Value
strAddr1 = cd.Parameters("@varAddress1").Value
strAddr2 = cd.Parameters("@varAddress2").Value
strCity = cd.Parameters("@varCity").Value
intStateID = cd.Parameters("@varStateID").Value
strZip = cd.Parameters("@varZip").Value
Catch ex As Exception
Msg = ex.Message
lblErr.Visible = True
lblErr.ForeColor = Drawing.Color.Red
lblErr.Font.Bold = True
lblErr.Text = Msg
Finally
cn.Close()
End Try
End Sub

For those who need to see the Stored Procedure it is:
USE databasename;
GO
IF OBJECT_ID('mrmsp_RetrieveEmployeeForEditting','P') IS NOT NULL
DROP PROCEDURE mrmsp_RetrieveEmployeeForEditting;
GO
CREATE PROCEDURE mrmsp_RetrieveEmployeeForEditting
@varEmployeeID INT,
@varTitleID INT OUTPUT,
@varDeptID INT OUTPUT,
@varLName VARCHAR(25) OUTPUT,
@varFName VARCHAR(15) OUTPUT,
@varMI VARCHAR(1) OUTPUT,
@varAddrTypeID INT OUTPUT,
@varAddress1 VARCHAR(40) OUTPUT,
@varAddress2 VARCHAR(40) OUTPUT,
@varCity VARCHAR(40) OUTPUT,
@varStateID INT OUTPUT,
@varZip VARCHAR(10) OUTPUT
AS
SELECT @varTitleID = tblEmployees.[TitleID],
@varDeptID = tblEmployees.[DeptID], @varLName = tblEmployees.[LName],
@varFName = tblEmployees.[FName], @varMI = tblEmployees.[MI],
@varAddrTypeID = tblAddresses.[AddressTypeID],
@varAddress1 = tblAddresses.[Address1],
@varAddress2 = tblAddresses.[Address2],
@varCity = tblAddresses.[City],
@varStateID = tblAddresses.[StateID],
@varZip = tblAddresses.[ZipCode]
FROM databasename.dbo.tblEmployees
INNER JOIN databasename.dbo.tblAddresses
ON databasename.dbo.tblEmployees.EmployeeID =
databasename.dbo.tblAddresses.EmployeeID
WHERE databasename.dbo.tblEmployees.EmployeeID = @varEmployeeID
AND databasename.dbo.tblEmployees.Deleted = 0

The intEmployeeID parameter is the only parameter that is showing up. The ones below the txtID.Text are empty. When I ran the Stored procedure within SQL Server the information was there. Does anyone have any idea why this is not working?



Thanks



Quecumber256
AnswerRe: No data being returned by the stored procedure. Pin
Jesse Squire14-Feb-07 4:10
Jesse Squire14-Feb-07 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.