Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8308597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:51:31+00:00 2026-06-08T18:51:31+00:00

My probelm is at da.Update(dt). I recieve OleDbException was unhandled. Syntax error in INSERT

  • 0

My probelm is at da.Update(dt). I recieve OleDbException was unhandled. Syntax error in INSERT INTO statement. The weird thing is it ran before when I was only saving 10 items and now it doesn’t run at all quite confused. Thanks for any assistance.

Dim dt As New DataTable
    Dim ds As New DataSet

    con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\MyComplete.accdb;Persist Security Info=False;"

    con.Open()
    MsgBox("here")
    ds.Tables.Add(dt)

    Dim da As New OleDbDataAdapter

    da = New OleDbDataAdapter("SELECT * FROM DealerReview", con)

    da.Fill(dt)


    Dim newRow As DataRow = dt.NewRow

    newRow.Item(1) = User
    newRow.Item(2) = Associate
    newRow.Item(3) = "1"
    newRow.Item(4) = Time
    newRow.Item(5) = Hold
    newRow.Item(6) = GreetingR
    newRow.Item(7) = GreetingA
    newRow.Item(8) = GreetingO
    newRow.Item(9) = GreetingTs
    newRow.Item(10) = GreetingG
    newRow.Item(11) = holdUpdate
    newRow.Item(12) = LookupSize
    newRow.Item(13) = DlyD
    newRow.Item(14) = SiPrice
    newRow.Item(15) = SiDoorPrice
    newRow.Item(16) = TBrand
    newRow.Item(17) = TModel
    newRow.Item(18) = SeveralChoices
    newRow.Item(19) = Financing
    newRow.Item(20) = Benefits
    newRow.Item(21) = Apt
    newRow.Item(22) = ITime
    newRow.Item(23) = AssociateScore
    newRow.Item(24) = hms
    newRow.Item(25) = ymd
    newRow.Item(26) = ElapsedTime


    dt.Rows.Add(newRow)
    Dim cb As New OleDbCommandBuilder(da)
    cb.GetInsertCommand()
    da.Update(dt)
    MsgBox("Saved")
    con.Close()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:51:32+00:00Added an answer on June 8, 2026 at 6:51 pm

    This is the error that you get when your Item’s count and/or datatype’s do not match the column definitions of the table that you are writing to. There are other possibilities, but since you mentioned that you added more items, and you have not shown us the table definition, that seems the most likely possibility.

    You cannot just add more items (columns) to a database command, they have to match the table columns that you are reading/writing from/to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some operations that are inside blocks. This operations, only update an UIImage
Update: I found the problem, I output the sql statement to a file instead
Hopefully someone can help me debug this problem as EXC_BAD_ACCESS is the only error
UPDATE: Problem located in my related question - Nokogiri performance problem I am having
I am having a binding update problem with my ComboBox. My ComboBox's ItemSource is
UPDATE: First problem solved, second one described at the bottom of this post. UPDATE2:
Update : The problem appears to have been corrupt DLLs somewhere in my PHP
Update II Problem Solved but Why? This has been the biggest headache ever. My
I am having a problem when i update an entry in my postgresql database,
I am facing a problem - can not update the price of the variant

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.