![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
OLEDB Parameter Question
Hi,
I have a dataset that I want to use to insert records into an empty Access database table. The table does not have any indexes or required fields. It is just a dumping ground enroute to an Excel spreadsheet. The dataadapter update command fails with "Parameter ?_6 has no default value" It appears to be due to one or more fields having a null value or empty string? If I reduce the insert statement to a subset of the fields it works. Given that the target table has no required fields what could be causing this? Is there a way around it? Thanks Bob |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: OLEDB Parameter Question
Bob,
The reason this is occuring is that you are not defining fields in your insert query that need to be populated. If the field does not have a default constraint, then you MUST insert some sort of value for it in your insert statement. It has nothing to do with a null value or an empty string. -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "bob" <startatbob_clegg@cutthis.adriley.co.nz> wrote in message news:a819d3tiqcifs7118cm0f0ug929htnfltg@4ax.com... > Hi, > I have a dataset that I want to use to insert records into an empty > Access database table. > > The table does not have any indexes or required fields. > It is just a dumping ground enroute to an Excel spreadsheet. > > The dataadapter update command fails with > "Parameter ?_6 has no default value" > > It appears to be due to one or more fields having a null value or > empty string? > > If I reduce the insert statement to a subset of the fields it works. > > Given that the target table has no required fields what could be > causing this? > Is there a way around it? > > Thanks > Bob |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| %windir%\security \database\secedit.sdb ) was. The parameter is in | nazrul | Windows Security | 2 | 28-08-2007 12:14 PM |
| %windir%\security \database\secedit.sdb ) was. The parameter is in | nazrul | Windows Security | 0 | 28-08-2007 12:14 PM |
| KeepAliveTime parameter in the registry | Rachel L Chipman | Windows Server 2003 | 0 | 28-08-2007 11:15 AM |
| Incorrect Parameter | Geo | Windows Vista All | 2 | 17-08-2007 04:54 PM |
| Parameter Passed In correct | bhanik | Windows XP | 2 | 16-08-2007 05:29 PM |
| New To Site? | Need Help? |