I usually use SQL Server 2008 and the following code works perfectly with it so I think its an SQL Server 2005 thing but am not 100% sure.
I am getting an amount of money from a textbox and inputting it into a database table with a field 'money'
am using a stored procedure - it works fine with every other field apart from the money field.
the code below doesn't work (i'm passing through a textbox (string))
I tried using CONVERT(MONEY, @Amount) instead of just @Amount but it made no difference.
anyone know what i'm missing?
p.s. - before someone asks I have checked that it is passing the correct textbox etc.
ALTER PROCEDURE [dbo].[procedurename]
@Amount money = null
SET NOCOUNT ON;
INSERT INTO Table1 (Amount)