Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 The Convert function and the proper syntax when using update.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-26 : 17:38:03
LpPq writes "How do I use the Convert function to convert and what is the proper syntax when using update?


Here is the error I get.
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion from data type varchar to data type money, table 'EC01DB.dbo.Quotation', column 'DollarValueQuoted'. Use the CONVERT function to run this query.


And here is my code in the program
cmdQuote.CommandText = "UPDATE Quotation SET SalesBranchCode = '" & Request.Form("BranchID") & _
"', SalesRepID = '" & Request.Form("SalesRepID") &_
"', CustomerID = '" & Request.Form("CustomerID") &_
"', CustomerContact = '" & Request.Form("CustomerContact") &_
"', ProjectDescription = '" & Request.Form("ProjectDescription") &_
"', DollarValueQuoted = '" & DollarValueQuoted &_
"', RealisticLeggettValueOpportunity = '" & RealisticLeggettValueOpportunity &_
"', ProductionStartMonthYear = '" & ProductionStartMonthYear &_
"', ProductionEndMonthYear = '" & ProductionEndMonthYear &_
"', PrototypeDueDate = '" & PrototypeDueDate &_
"', QuoteDueDate = '" & QuoteDueDate &_
"', CustomerDecisionDate = '" & CustomerDecisionDate &_
"', Comments = '" & Request.Form("Comments") &_
"', Status = '" & Request.Form("Status") &_
"' WHERE QuoteNo = " & sId

What am I doing wrong?"
   

- Advertisement -