WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MW4 on September 19, 2014, 12:25:43 PM

Title: MS Access Recordset addnew issue
Post by: MW4 on September 19, 2014, 12:25:43 PM
I have a script that pushes data into an access MDB using the addnew and update.

Table structure has changed and now is kicking because there is a duplicate.

In VBA within Access you can do this with a showarnings=false, but I am doing this within WBT.
Is there an equivalent line of code or should I be using something other than addnew?
Title: Re: MS Access Recordset addnew issue
Post by: stanl on September 19, 2014, 01:14:20 PM
With INSERT INTO.... in ADO using either Jet or the ACE Provider adding Jet OLEDB:Global Partial Bulk Ops=1 to the connect string will avoid duplicates on a key. Using Just Addnew() I'm afraid you are going to have to issue a select for the key or duplicate value, the addnew if the Recordset returns eof.