Hello! I am currently developing a web interface that has access to an MS ACCESS database. However, I am unable to key in more than 6 Values into the database using the INSERT INTO sql code.

Here are the codes that I am using:

 protected void bnAddPart_Click(object sender, EventArgs e)
            DataLayer.DataConnector dat = new DataLayer.DataConnector("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + Server.MapPath("MainData.accdb") + "'; Persist Security Info=False;");
            int dt = dat.DataInsert("INSERT INTO tbl_addpart(partno, serialno, location, technician, status, failuresymptom) VALUES('" + ddlPartNo.SelectedValue + "', '" + txtSN.Text + "', '" + ddlLocation.SelectedValue + "', '" + ddlTechnician.SelectedValue + "', '" + ddlStatus.SelectedValue + "', '" + txtFailure.Text + "')");


I would like to add in more than 6 values in one click. I hope someone would be able to help me!

Thank you in advance


Recommended Answers

Does your table have more than those six columns?

Jump to Post

All 2 Replies

Does your table have more than those six columns?

You can insert more than 6 values.Can you please tell the table structure and error that you are getting on inserting more than 6 values

Be a part of the DaniWeb community

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