Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Helixpoint #1
What am I doing wrong with this SP??
Gives me a NULL value at this line. and I know it has a 1
myShippingDetails.theShippingType = CStr(parametertheShippingType.Value)
Public Function GetSalesShippingInfo(ByVal SalesCookieID As String) As
ShippingDetails
' Create Instance of Connection and Command Object
Dim myConnection As New
SqlConnection(ConfigurationSettings.AppSettings("c onnectionString"))
Dim myCommand As New SqlCommand("GetSalesShippingInfo",
myConnection)
' Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure
' Add Parameters to SPROC
Dim parameterSalesCookieID As New SqlParameter("@SalesCookieID",
SqlDbType.NVarChar, 50)
parameterSalesCookieID.Value = SalesCookieID
myCommand.Parameters.Add(parameterSalesCookieID)
Dim parametertheShippingType As New
SqlParameter("@theShippingType", SqlDbType.Int, 4)
parametertheShippingType.Direction = ParameterDirection.Output
myCommand.Parameters.Add(parametertheShippingType)
Dim parametertheTotalShipping As New
SqlParameter("@theTotalShipping", SqlDbType.Float)
parametertheTotalShipping.Direction = ParameterDirection.Output
myCommand.Parameters.Add(parametertheTotalShipping )
Dim parametertheShipping As New SqlParameter("@theShipping",
SqlDbType.Int, 4)
parametertheShipping.Direction = ParameterDirection.Output
myCommand.Parameters.Add(parametertheShipping)
' Open the database connection and execute the command
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
' Create CustomerDetails Struct
Dim myShippingDetails As ShippingDetails = New ShippingDetails
' Populate Struct using Output Params from SPROC
myShippingDetails.theShippingType =
CStr(parametertheShippingType.Value)'********* Give null
myShippingDetails.theTotalShipping =
CStr(parametertheTotalShipping.Value)
myShippingDetails.theShipping = CStr(parametertheShipping.Value)
Return myShippingDetails
End Function
CREATE PROCEDURE GetSalesShippingInfo
(
@SalesCookieID nvarchar,
@theShippingType int OUTPUT,
@theTotalShipping float OUTPUT,
@theShipping float OUTPUT
)
AS
SELECT
@theShippingType = shippingType
FROM
tempSales
WHERE
tempSalesQuidID = @SalesCookieID
if @theShippingType = 1
BEGIN
SELECT @theShipping = SUM(tempSalesDetail.theShipping)
FROM tempSales INNER JOIN
tempSalesDetail ON tempSales.tempSalesID =
tempSalesDetail.tempSalesID
WHERE tempSales.tempSalesQuidID = @SalesCookieID
END
if @theShippingType = 2
BEGIN
SELECT totalShipping
FROM tempSales
WHERE tempSalesQuidID = @SalesCookieID
END
GO
--
______________________
David Fetrow
HelixPoint LLC.
[url]http://www.helixpoint.com[/url]
[email]davef@helixpoint.com[/email]
Interested in Affordable Email Marketing?
Check out the HelixMailer at [url]http://www.helixpoint.com/helixmailer.asp[/url]
If you are interested in becoming a Reseller of HelixPoint products, contact
[email]davef@helixpoint.com[/email]
______________________
Helixpoint Guest
-
something wrong..
I want to integrate following php-file into my Flash-movie, but something still does not work. The Php-file is like that: Online it looks like... -
What am I doing wrong?
> rs.Source="SELECT id From User Where upper I asked this before... Try sql = "SELECT id FROM user WHERE UPPER(cLoginID) = '" & vUserID &... -
What is wrong?
Take a look at your Stored Procedure. It takes a wide variety of data types. But in your code, you use an overloaded version of the Add() method of... -
What am I doing wrong???!?!
I have a simple form that based on the the two inputs, ExAD_Tracking and ExAD_DateEntered, will query the database and display the records... -
What am I doing wrong
I am trying to fade in an image over time, however the image keeps blinking, it fades in all the time. Below is my script. on exitFrame me go to...



Reply With Quote

