TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > C#(C Sharp)

Notices

Reply
 
Thread Tools Display Modes
Old 05-09-2007, 03:30 PM   #1
bob
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
  Reply With Quote
Old 27-11-2007, 11:29 AM   #2
Nicholas Paldino [.NET/C# MVP]
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


  Reply With Quote
Reply

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?

All times are GMT +5.5. The time now is 07:27 PM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional