Data type conversion

  • Thread starter Thread starter Thomas Beyerlein
  • Start date Start date
T

Thomas Beyerlein

Hi,
I need help with a Error message. It is do to a datatype conversion of a
varchar to a float. If anyone has code to convert or an away around this
problem that would be great.

Thanks for all the help.

Tom
 
float? You mean single or double?

a varchar returned from SQL Server is usually accessed as a "string".

If this be the case, then Single.Parse or Double.Parse will do. However,
it's better to use TryParse, just in case the number is badly formed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top