Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

VS 2010 [RESOLVED] Syntax Error in INSERT INTO statement..

$
0
0
Code:

                Dim DC As New DateConverter(Now.Date)

                Dim day As Double = DC.GetUnixTimestamp(DC.ToAD(StrToDate(txtDate.Text))),
                    BillNo As Double = Val(txtBillNo.Text),
                    SoldTo As String = txtSoldTo.Text,
                    Rate As Decimal = Val(txtRate.Text),
                    Quantity As Integer = Val(txtQuantity.Text),
                    Discount As Decimal = Val(txtDiscount.Text),
                    Paid As Decimal = Val(txtPaid.Text),
                    Remarks As String = txtRemarks.Text

                queryString = "INSERT INTO tbl_IncChickSales (Day, BillNo, SoldTo, Rate, Quantity, Discount, Paid, Remarks) " & _
                    "VALUES (" _
                    & day & "," _
                    & BillNo & ",'" _
                    & SoldTo & "'," _
                    & Rate & "," _
                    & Quantity & "," _
                    & Discount & "," _
                    & Paid & ",'" _
                    & Remarks & _
                    "')"

            Dim DB As New DataBase
            DB.ExecuteQuery(queryString)

Attachment 95217

And I can't figure out, WHERE actually is the SYNTAX incorrect?? Or it is something to do with DATA TYPE?

Thanks!
Attached Images
 

Viewing all articles
Browse latest Browse all 42225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>