OleDb Error

A

Ann Marinas

Hi all!

I'm developing an application that imports a CSV file then stores the
imported data to an XML file through a dataset and an Access database. I've
used the connection and data adapter objects. I don't have any problems in
saving the imported data in a dataset and xml file, but whenever I'm saving
it to the access database, I always get this error:

=====================================
System.Data.OleDb.OleDbException: Parameter ?_1 has no default value.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
=====================================

I've tried changing my insert command many times but the error keeps on
popping up.

Please help!

Thanks!

A :D
 
T

Tim Stephenson

If using a dataadapter to manage updates to your database, double check your
update / insert commands as it looks like you're trying to run some sort of
paramaterised query and not supplying all the paramaters.

Either that, or you might be trying to insert values to your database table,
but not supplying a value for fields specified as "not null".

Rgds

Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top