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 + "')");

            {
                Response.Redirect("Home.aspx");
            }
        }

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

Iz

Recommended Answers

All 2 Replies

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.