I'm getting the following error which (I think) objects to using the 'sweight' parm in the stored proc. I can't work out how I would use the CONVERT function as all given examples are for SELECT statements not qualifying statements:
"Microsoft OLE DB Provider for SQL Server (0x80040E14)
Implicit conversion from data type nvarchar to money is not allowed. Use the CONVERT function to run this query."
The script is as follows:
sweight = parseFloat(tempWt);
if (sHWkey > 0)
{
loRS = Server.CreateObject("ADODB.Recordset"
loRS.Open("Exec GetRates " + sCountry + "," + sweight + "," + sHWkey ,sdbConnString);
The Stored Procedure is:
CREATE PROCEDURE [GetRates]
(@country text, @weight money, @HWkey int)
AS
SELECT PForce.grade1,PForce.grade2,PForce.grade3,PForce.grade4,PForce.grade5,PForce.grade6, Grades.grade
FROM PForce INNER JOIN
Zones ON PForce.Zone = Zones.Zone INNER JOIN
Grades ON Zones.Zone =Grades.Zone
WHERE (Zones.country like @country) and (PForce.weight = @weight) and (Grades.HWKey = @HWKey)
"Microsoft OLE DB Provider for SQL Server (0x80040E14)
Implicit conversion from data type nvarchar to money is not allowed. Use the CONVERT function to run this query."
The script is as follows:
sweight = parseFloat(tempWt);
if (sHWkey > 0)
{
loRS = Server.CreateObject("ADODB.Recordset"
loRS.Open("Exec GetRates " + sCountry + "," + sweight + "," + sHWkey ,sdbConnString);
The Stored Procedure is:
CREATE PROCEDURE [GetRates]
(@country text, @weight money, @HWkey int)
AS
SELECT PForce.grade1,PForce.grade2,PForce.grade3,PForce.grade4,PForce.grade5,PForce.grade6, Grades.grade
FROM PForce INNER JOIN
Zones ON PForce.Zone = Zones.Zone INNER JOIN
Grades ON Zones.Zone =Grades.Zone
WHERE (Zones.country like @country) and (PForce.weight = @weight) and (Grades.HWKey = @HWKey)