MySQL Forums
Forum List  »  Connector/Arduino

Error while insert data Into table
Posted by: POKHRAJ Das
Date: November 29, 2017 08:04AM

Hi,
I am facing error while inserting data into table...
The below is my table structure..

==================
create table arduino (arvalue double(10,2));
======

Now when I am trying to insert data from vb.net it is throwing error..

"Excption: Thrown You have an error in sql syntax.
===========
But when manually I am trying to insert from mySQL workbench, it is working fine.

=============
Below is my sql syntax from vb.net.....

Dim readserialdata As String
Dim sqlquery As String
Dim cmd As New MySqlCommand
readserialdata = myport.ReadLine()
Label1.Text = readserialdata
sqlquery = "insert into tab1 values(" & Trim(readserialdata) & ")"
cmd = New MySqlCommand(sqlquery, cn)
cmd.ExecuteNonQuery()

Options: ReplyQuote


Subject
Views
Written By
Posted
Error while insert data Into table
1579
November 29, 2017 08:04AM


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.