Results 1 to 2 of 2

Thread: Error!

  1. #1
    Join Date
    Dec 1969

    Default Error!

    This what i have, I want to save a string from my page to a money type on the Sql server database. I had wrote:<BR><BR>CType(txtUSFunds.Text, Decimal)<BR><BR>and this is the error I get:<BR><BR>Disallowed implicit conversion from data type varchar to data type money, table &#039;_PRfq.dbo.RFQMaster&#039;, column &#039;USFunds&#039;. Use the CONVERT function to run this query.<BR><BR>Thankyou for your time.

  2. #2
    Join Date
    Dec 1969

    Default RE: Error!

    try converting your value to a dollar amount using the following then inserting into the DB.<BR><BR>dim a as string<BR>a = string.format("{0:c}",valuetoconvert)<BR><BR>a = $4.50<BR><BR>The only issue you may have a problem with is the dollar($) which you can remove using a function or the right() conversion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts