ERROR IN ADD STATEMENT

THIS IS MY CODE

Dim cb As New OleDb.OleDbCommandBuilder(da)
        Dim nr As DataRow

        nr = ds.Tables("a").NewRow()
        nr.Item(0) = TextBox1.Text
        nr.Item(1) = TextBox2.Text
        nr.Item(2) = TextBox3.Text
        
        ds.Tables("a").Rows.Add(nr)
        da.Update(ds, "a")
        MsgBox("Datarow added")

Syntax error in INSERT INTO statement.
System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147217900

I have taken textbox3 as memo in db & multilined it in my vb.net project..

Is this the reason ??
PLZZ HELP ME.. WHAT TO NOW??

Hi,
does the code of adding new row to the dataTable works? I think it does, the code you posted looks ok.
Would you mind posting the whole code, including SELECT sql statement?

i have got the solution thankuu

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.