I'm having trouble converting a decimal value into SQL Server 2000 money format.
Convert(money(19,4), '#FORM.LOCAmt#')
Before it worked fine SQL Server 7, but ever since I have installed the new SQL Server 2000 and restored all the databases and tables accordingly, all the ColdFusion web pages that interfaces into SQL Server 2000 that are creating/modify this field are having this problem (this first sentence above.)
This is the original code:
<CFQUERY NAME="qryRefundCredit" DBNAME="#Application.DSN3#" DBTYPE="ODBC" DATASOURCE="#Application.DSN3#">
INSERT INTO dbo.RefundCredit
(RegistrationID,
Refund_Or_Credit,
RefundCredit_Amt,
RefundCredit_Date,
Reason,
Comments,
UserID,
UserName,
Method_Of_Refund,
PaymentID,
AccountCode,
CourseID,
SectionID,
TrialID
)
values ('#FORM.RID#',
<CFIF FORM.Type EQ "D">
'C',
<CFELSE>
'R',
</CFIF>
Convert(money(19,4), '#FORM.LOCAmt#'),
'#TODAYS_DATE#',
'#FORM.Reasons#',
<CFIF FORM.Comments NEQ "">
'#FORM.Comments#',
<CFELSE>
NULL,
</CFIF>
'#SESSION.PERSON_ID#',
'#SESSION.FIRST_NAME# #SESSION.LAST_NAME#',
NULL,
NULL,
'#FORM.AccountCode#',
'#FORM.CID#',
'#FORM.SID#',
'#FORM.TID#'
)
</CFQUERY>
Does SQL Server 2000 have a new syntax? If not, can someone help me find out why this is happening?
Thanks for your help.
Convert(money(19,4), '#FORM.LOCAmt#')
Before it worked fine SQL Server 7, but ever since I have installed the new SQL Server 2000 and restored all the databases and tables accordingly, all the ColdFusion web pages that interfaces into SQL Server 2000 that are creating/modify this field are having this problem (this first sentence above.)
This is the original code:
<CFQUERY NAME="qryRefundCredit" DBNAME="#Application.DSN3#" DBTYPE="ODBC" DATASOURCE="#Application.DSN3#">
INSERT INTO dbo.RefundCredit
(RegistrationID,
Refund_Or_Credit,
RefundCredit_Amt,
RefundCredit_Date,
Reason,
Comments,
UserID,
UserName,
Method_Of_Refund,
PaymentID,
AccountCode,
CourseID,
SectionID,
TrialID
)
values ('#FORM.RID#',
<CFIF FORM.Type EQ "D">
'C',
<CFELSE>
'R',
</CFIF>
Convert(money(19,4), '#FORM.LOCAmt#'),
'#TODAYS_DATE#',
'#FORM.Reasons#',
<CFIF FORM.Comments NEQ "">
'#FORM.Comments#',
<CFELSE>
NULL,
</CFIF>
'#SESSION.PERSON_ID#',
'#SESSION.FIRST_NAME# #SESSION.LAST_NAME#',
NULL,
NULL,
'#FORM.AccountCode#',
'#FORM.CID#',
'#FORM.SID#',
'#FORM.TID#'
)
</CFQUERY>
Does SQL Server 2000 have a new syntax? If not, can someone help me find out why this is happening?
Thanks for your help.