ADO 2.1 / Error -2147467259 
Author Message
 ADO 2.1 / Error -2147467259

I use the code below to update Access file with data from remote system.
Besides the primary keys there are some fields with no duplicates index.
When the update file contains a conflicting value, ADO raises the
rror  2147467259 duplicate values in the index, routine in writeErr:
changes the value and returns to the loop. Now the SQL clause is executed
normally. Problem is that this happens only ones. Next conflicting value
stops the program without any error control. Whats the problem?

Thanks in advance for your help.

<EHi>

----Code clip ---------------------------
  On Error GoTo writeErr
   Set cnnADO = New ADODB.Connection
   cnnADO.Provider = "Microsoft.Jet.OLEDB.4.0"
   cnnADO.Open DBName, "Admin", ""
   cnnADO.BeginTrans
   For i = 0 To UBound(aSQLs)
tryAgain:
        cnnADO.Execute aSQLs(i), lAffected, adCmdText + adExecuteNoRecords
   Next i
   cnnADO.CommitTrans
   cnnADO.Close
    ...
   Exit Function

writeErr:
   'aSQLs(i) is modified so that there is no longer any conflict with the
existeng value
    ...
    cnnADO.Errors.Clear
    Err.Clear
    GoTo tryAgain
-------------------------------------------------



Fri, 06 Sep 2002 03:00:00 GMT  
 ADO 2.1 / Error -2147467259

Quote:
>     GoTo tryAgain

I think you meant
Resume tryAgain

Peter

Quote:

> I use the code below to update Access file with data from remote system.
> Besides the primary keys there are some fields with 'no duplicates' index.
> When the update file contains a conflicting value, ADO raises the
> rror  -2147467259 ".duplicate values in the index.", routine in writeErr:
> changes the value and returns to the loop. Now the SQL clause is executed
> normally. Problem is that this happens only ones. Next conflicting value
> stops the program without any error control. What's the problem?

> Thanks in advance for your help.

> <EHi>

> ----Code clip ---------------------------
>   On Error GoTo writeErr
>    Set cnnADO = New ADODB.Connection
>    cnnADO.Provider = "Microsoft.Jet.OLEDB.4.0"
>    cnnADO.Open DBName, "Admin", ""
>    cnnADO.BeginTrans
>    For i = 0 To UBound(aSQLs)
> tryAgain:
>         cnnADO.Execute aSQLs(i), lAffected, adCmdText + adExecuteNoRecords
>    Next i
>    cnnADO.CommitTrans
>    cnnADO.Close
>     ...
>    Exit Function

> writeErr:
>    'aSQLs(i) is modified so that there is no longer any conflict with the
> existeng value
>     ...
>     cnnADO.Errors.Clear
>     Err.Clear
>     GoTo tryAgain
> -------------------------------------------------



Sun, 08 Sep 2002 03:00:00 GMT  
 ADO 2.1 / Error -2147467259
Yes, the error was there. Using Resume tryAgain the code works well. I'm
blind.

<EHi>


Quote:
>>     GoTo tryAgain

>I think you meant
>Resume tryAgain

>Peter



Sun, 08 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error -2147467259 - Could not find installable ISAM using ADO 2.1

2. Error -2147467259 - Could not find installable ISAM using ADO 2.1

3. ADO UpdateBatch error -2147467259 Native Error 1009

4. Unpredictable ADO error '-2147467259 - unspecified error'

5. ADO UpdateBatch error -2147467259 Native Error 1009

6. WIN2000 ADO ERROR -2147467259 With Requery

7. ADO, Run-time error '-2147467259(80004005)'

8. ADO error -2147467259

9. Error -2147467259 in the ADO

10. VB6 ADO Error -2147467259 During RecordSource Assignment In DataGrid

11. ADO Automation Error 2147467259

12. -2147467259 Unspecified error using ADO 2.5 connection object

 

 
Powered by phpBB® Forum Software