MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: Read using ExecuteScalar
Posted by: Luis Penunuri
Date: March 09, 2016 10:54AM

Hi Gunnar,

What is the datatype of the field "cpichpower" ?

I did a copy paste of your code (just replacing the connection string and the database-table-field names), and I can see the result containing a dot.

Also, please consider that the code used above will return only the first column of the first row, as indicated here:
https://msdn.microsoft.com/es-es/library/system.data.sqlclient.sqlcommand.executescalar(v=vs.110).aspx

You can check whether the first result in fact contains a dot, using a tool like Workbench to execute the query above.

Regards.

Options: ReplyQuote


Subject
Views
Written By
Posted
892
March 01, 2016 08:23AM
442
March 08, 2016 05:28PM
447
March 09, 2016 12:03AM
Re: Read using ExecuteScalar
419
March 09, 2016 10:54AM
402
March 10, 2016 12:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.