[ODBC Microsoft Access Driver] ODBC--call failed.
Author |
Message |
Rick Tone #1 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
Wow after reading about 50 messages I learned one thing they didn't answer this one. I am trying to update a field in an Access 97 OR 2000 (I have tried both of them) table it keeps erroring with Error -2147467259. Any ideas would be great. Rick Toner
---------------------------------------------------------------------------- --------------------------------------------------------------- Here is the error: "*** ADO ERROR CONDITION! Start *** 5/18/2001 12:33:09 PM" "ADO Error #1:" " ADO Error : #-2147467259" " Description: [Microsoft][ODBC Microsoft Access Driver] ODBC--call failed." " Source : Microsoft OLE DB Provider for ODBC Drivers" " NativeError: -2001" " SQLState : S1000" "" "*** ADO ERROR CONDITION! End***" ---------------------------------------------------------------------------- -------------------------------------------------------------- Here is the SQL statement: UPDATE ttblOffender INNER JOIN TempOffender ON ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] WHERE (((TempOffender.lngJWAN_ID)=0)); ---------------------------------------------------------------------------- --------------------------------------------------------------- Here is the code calling it: Function ADO_Query(conQry As ADODB.Connection, strQryName As String) As Boolean On Error GoTo Err_CloseADO_Query Dim Qy As New ADODB.Command Dim prop As ADODB.Property Call CheckPause("Running query... " & strQryName) ADO_Query = False gdblRows = 0 Set Qy.ActiveConnection = conQry With Qy .CommandType = adCmdStoredProc .CommandText = strQryName .CommandTimeout = 30 End With Qy.Execute gdblRows ADO_Query = True Exit_CloseADO_Query: On Error Resume Next Set Qy = Nothing Exit Function Err_CloseADO_Query: If Err.Number <> 0 Then LogProgramError Err.Number, Err.Description, "ADO_Query()." & strQryName, "basDataConnections" Call LogADOError(conQry) Resume Exit_CloseADO_Query End Function
|
Wed, 05 Nov 2003 01:03:21 GMT |
|
 |
Randy Charles Mori #2 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
The error number is better expressed in hex as 80004005. If you look this number up in winerror.h, then you get E_FAIL. In other words a very generic error. Sorry, it is unlikely anybody will be able to help. At least not me. -- Randy Charles Morin http://www.kbcafe.com/randycharlesmorin
Quote: > Wow after reading about 50 messages I learned one thing they didn't answer > this one. > I am trying to update a field in an Access 97 OR 2000 (I have tried both of > them) table it keeps erroring with Error -2147467259. > Any ideas would be great. > Rick Toner
> -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the error: > "*** ADO ERROR CONDITION! Start *** 5/18/2001 12:33:09 PM" > "ADO Error #1:" > " ADO Error : #-2147467259" > " Description: [Microsoft][ODBC Microsoft Access Driver] ODBC--call > failed." > " Source : Microsoft OLE DB Provider for ODBC Drivers" > " NativeError: -2001" > " SQLState : S1000" > "" > "*** ADO ERROR CONDITION! End***" > -------------------------------------------------------------------------- -- > -------------------------------------------------------------- > Here is the SQL statement: > UPDATE ttblOffender INNER JOIN TempOffender ON > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] > WHERE (((TempOffender.lngJWAN_ID)=0)); > -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the code calling it: > Function ADO_Query(conQry As ADODB.Connection, strQryName As String) As > Boolean > On Error GoTo Err_CloseADO_Query > Dim Qy As New ADODB.Command > Dim prop As ADODB.Property > Call CheckPause("Running query... " & strQryName) > ADO_Query = False > gdblRows = 0 > Set Qy.ActiveConnection = conQry > With Qy > .CommandType = adCmdStoredProc > .CommandText = strQryName > .CommandTimeout = 30 > End With > Qy.Execute gdblRows > ADO_Query = True > Exit_CloseADO_Query: > On Error Resume Next > Set Qy = Nothing > Exit Function > Err_CloseADO_Query: > If Err.Number <> 0 Then LogProgramError Err.Number, Err.Description, > "ADO_Query()." & strQryName, "basDataConnections" > Call LogADOError(conQry) > Resume Exit_CloseADO_Query > End Function
|
Wed, 05 Nov 2003 09:35:58 GMT |
|
 |
Tom Gilme #3 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
http://support.microsoft.com/support/kb/articles/Q161/2/88.asp
Quote: > The error number is better expressed in hex as 80004005. If you look this > number up in winerror.h, then you get E_FAIL. In other words a very generic > error. Sorry, it is unlikely anybody will be able to help. At least not me. > -- > Randy Charles Morin > http://www.kbcafe.com/randycharlesmorin
|
Wed, 05 Nov 2003 20:10:53 GMT |
|
 |
GS #4 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
Hello Rick. May be this article will help you: http://support.microsoft.com/support/kb/articles/Q286/1/26.ASP . -- Intermedia.NET (GS) Microsoft Certified Solutions Provider Providing expertise in hosting applications More Tips at: http://www.intermedia.net/support/kb/ Windows 2000 Web Hosting: http://www.intermedia.net/ For a waiver of the set up fee use "IMFREE" code
Quote: > Wow after reading about 50 messages I learned one thing they didn't answer > this one. > I am trying to update a field in an Access 97 OR 2000 (I have tried both of > them) table it keeps erroring with Error -2147467259. > Any ideas would be great. > Rick Toner
> -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the error: > "*** ADO ERROR CONDITION! Start *** 5/18/2001 12:33:09 PM" > "ADO Error #1:" > " ADO Error : #-2147467259" > " Description: [Microsoft][ODBC Microsoft Access Driver] ODBC--call > failed." > " Source : Microsoft OLE DB Provider for ODBC Drivers" > " NativeError: -2001" > " SQLState : S1000" > "" > "*** ADO ERROR CONDITION! End***" > -------------------------------------------------------------------------- -- > -------------------------------------------------------------- > Here is the SQL statement: > UPDATE ttblOffender INNER JOIN TempOffender ON > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] > WHERE (((TempOffender.lngJWAN_ID)=0)); > -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the code calling it: > Function ADO_Query(conQry As ADODB.Connection, strQryName As String) As > Boolean > On Error GoTo Err_CloseADO_Query > Dim Qy As New ADODB.Command > Dim prop As ADODB.Property > Call CheckPause("Running query... " & strQryName) > ADO_Query = False > gdblRows = 0 > Set Qy.ActiveConnection = conQry > With Qy > .CommandType = adCmdStoredProc > .CommandText = strQryName > .CommandTimeout = 30 > End With > Qy.Execute gdblRows > ADO_Query = True > Exit_CloseADO_Query: > On Error Resume Next > Set Qy = Nothing > Exit Function > Err_CloseADO_Query: > If Err.Number <> 0 Then LogProgramError Err.Number, Err.Description, > "ADO_Query()." & strQryName, "basDataConnections" > Call LogADOError(conQry) > Resume Exit_CloseADO_Query > End Function
|
Fri, 07 Nov 2003 19:35:24 GMT |
|
 |
GS #5 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
Hello Rick. I've found another article http://support.microsoft.com/support/kb/articles/Q209/1/57.ASP . -- Intermedia.NET (GS) Microsoft Certified Solutions Provider Providing expertise in hosting applications More Tips at: http://www.intermedia.net/support/kb/ Windows 2000 Web Hosting: http://www.intermedia.net/ For a waiver of the set up fee use "IMFREE" code
Quote: > Wow after reading about 50 messages I learned one thing they didn't answer > this one. > I am trying to update a field in an Access 97 OR 2000 (I have tried both of > them) table it keeps erroring with Error -2147467259. > Any ideas would be great. > Rick Toner
> -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the error: > "*** ADO ERROR CONDITION! Start *** 5/18/2001 12:33:09 PM" > "ADO Error #1:" > " ADO Error : #-2147467259" > " Description: [Microsoft][ODBC Microsoft Access Driver] ODBC--call > failed." > " Source : Microsoft OLE DB Provider for ODBC Drivers" > " NativeError: -2001" > " SQLState : S1000" > "" > "*** ADO ERROR CONDITION! End***" > -------------------------------------------------------------------------- -- > -------------------------------------------------------------- > Here is the SQL statement: > UPDATE ttblOffender INNER JOIN TempOffender ON > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] > WHERE (((TempOffender.lngJWAN_ID)=0)); > -------------------------------------------------------------------------- -- > --------------------------------------------------------------- > Here is the code calling it: > Function ADO_Query(conQry As ADODB.Connection, strQryName As String) As > Boolean > On Error GoTo Err_CloseADO_Query > Dim Qy As New ADODB.Command > Dim prop As ADODB.Property > Call CheckPause("Running query... " & strQryName) > ADO_Query = False > gdblRows = 0 > Set Qy.ActiveConnection = conQry > With Qy > .CommandType = adCmdStoredProc > .CommandText = strQryName > .CommandTimeout = 30 > End With > Qy.Execute gdblRows > ADO_Query = True > Exit_CloseADO_Query: > On Error Resume Next > Set Qy = Nothing > Exit Function > Err_CloseADO_Query: > If Err.Number <> 0 Then LogProgramError Err.Number, Err.Description, > "ADO_Query()." & strQryName, "basDataConnections" > Call LogADOError(conQry) > Resume Exit_CloseADO_Query > End Function
|
Fri, 07 Nov 2003 19:37:41 GMT |
|
 |
Rick Tone #6 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
I have already tried looping through the errors collection. No luck this is the only message i'm getting. Rick
Quote: > http://support.microsoft.com/support/kb/articles/Q161/2/88.asp
> > The error number is better expressed in hex as 80004005. If you look this > > number up in winerror.h, then you get E_FAIL. In other words a very > generic > > error. Sorry, it is unlikely anybody will be able to help. At least not > me. > > -- > > Randy Charles Morin > > http://www.kbcafe.com/randycharlesmorin
|
Fri, 07 Nov 2003 21:03:42 GMT |
|
 |
Richar #7 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
On Mon, 21 May 2001 09:03:42 -0400, "Rick Toner" Quote:
>I have already tried looping through the errors collection. No luck this is >the only message i'm getting. >Rick
You could give us some code. Have you stopped the code at the point of the update and executed rs.Supports(adUpdate) in the immediate window, where rs is the name of your recordset? If it is False, then the current type fo recordset or connection does not allow an update. Does the recordset select from a single table, or joined tables? Although it is not the problem, is there a reason why you are using ODBC rather then the faster and more capable native Access Jet 4.0 driver? Richard. Quote:
>> http://support.microsoft.com/support/kb/articles/Q161/2/88.asp
>> > The error number is better expressed in hex as 80004005. If you look >this >> > number up in winerror.h, then you get E_FAIL. In other words a very >> generic >> > error. Sorry, it is unlikely anybody will be able to help. At least not >> me. >> > -- >> > Randy Charles Morin >> > http://www.kbcafe.com/randycharlesmorin
|
Fri, 07 Nov 2003 21:44:09 GMT |
|
 |
Richar #8 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
When I sent my previous reply, I couldn't see you original post. I then found in another group that you had posted some source code. Quote: > UPDATE ttblOffender INNER JOIN TempOffender ON > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] > WHERE (((TempOffender.lngJWAN_ID)=0));
You have a one to many join here, and you are updating a field in the "many" table. I could imagine that not working. If you can live with a "do until rs.EOF .... loop" type statement, you could open a recordset "rs" from a query like: " SELECT DISTINCT TempOffender.lngMaster_Name_Link, " & _ " [ttblOffender]![lngJwan_ID], FROM ttblOffender INNER JOIN " & _ " TempOffender ON ttblOffender.lngOffForeignSysID = " & _ "TempOffender.lngMaster_Name_Link " & _ " WHERE (((TempOffender.lngJWAN_ID)=0));" and for each row of the recordset, run cn.execute "UPDATE Projects SET lngJWAN_ID = " & _ cstr(rs!TempOffender.lngMaster_Name_Link) & _ " WHERE lngMaster_Name_Link = & _ " & rs!ttblOffender.lngOffForeignSysID I could easily have made a typing mistake in the above, so please check. I am assuming that the ID's and Links as numeric. if they are strings, you will have to add the appropriate single quotes to this UPDATE statement. Richard.
|
Fri, 07 Nov 2003 22:24:55 GMT |
|
 |
Rick Tone #9 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
The code was provided at the top level, I'm not using a recordset just an update statement. I'm using ODBC insted of JET 4.0 because i am using stored procedures and it works alot beter through jet then JET, I would have to use ADOX if i used the JET OLEDB Provider. This app runes off jet and SQL depending of platform. Rick
Quote: > On Mon, 21 May 2001 09:03:42 -0400, "Rick Toner"
> >I have already tried looping through the errors collection. No luck this is > >the only message i'm getting. > >Rick > You could give us some code. > Have you stopped the code at the point of the update and executed > rs.Supports(adUpdate) > in the immediate window, where rs is the name of your recordset? If > it is False, then the current type fo recordset or connection does not > allow an update. > Does the recordset select from a single table, or joined tables? > Although it is not the problem, is there a reason why you are using > ODBC rather then the faster and more capable native Access Jet 4.0 > driver? > Richard.
> >> http://support.microsoft.com/support/kb/articles/Q161/2/88.asp
> >> > The error number is better expressed in hex as 80004005. If you look > >this > >> > number up in winerror.h, then you get E_FAIL. In other words a very > >> generic > >> > error. Sorry, it is unlikely anybody will be able to help. At least not > >> me. > >> > -- > >> > Randy Charles Morin > >> > http://www.kbcafe.com/randycharlesmorin
|
Sat, 08 Nov 2003 00:58:10 GMT |
|
 |
Rick Tone #10 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
Thanks I guess I could try this I was just trying to save some steps. Rick
Quote: > When I sent my previous reply, I couldn't see you original post. I > then found in another group that you had posted some source code. > > UPDATE ttblOffender INNER JOIN TempOffender ON > > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET > > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] > > WHERE (((TempOffender.lngJWAN_ID)=0)); > You have a one to many join here, and you are updating a field in the > "many" table. > I could imagine that not working. > If you can live with a "do until rs.EOF .... loop" type statement, > you could open a recordset "rs" from a query like: > " SELECT DISTINCT TempOffender.lngMaster_Name_Link, " & _ > " [ttblOffender]![lngJwan_ID], FROM ttblOffender INNER JOIN " & _ > " TempOffender ON ttblOffender.lngOffForeignSysID = " & _ > "TempOffender.lngMaster_Name_Link " & _ > " WHERE (((TempOffender.lngJWAN_ID)=0));" > and for each row of the recordset, run > cn.execute "UPDATE Projects SET lngJWAN_ID = " & _ > cstr(rs!TempOffender.lngMaster_Name_Link) & _ > " WHERE lngMaster_Name_Link = & _ > " & rs!ttblOffender.lngOffForeignSysID > I could easily have made a typing mistake in the above, so please > check. I am assuming that the ID's and Links as numeric. if they are > strings, you will have to add the appropriate single quotes to this > UPDATE statement. > Richard.
|
Sat, 08 Nov 2003 01:00:31 GMT |
|
 |
Richar #11 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
On Mon, 21 May 2001 13:00:31 -0400, "Rick Toner" Quote:
>Thanks I guess I could try this I was just trying to save some steps. >Rick
I realised that was what you were trying to do everything in one fast SQL statement rather than a slow loop. There may be some clever way to do it with SQL. Perhaps someone will get some inspiration. I made some mistakes below due to not working through your code properly, but the idea is tha same. You are updating the "one" table, not the "many", but the UPDATE statement can potentially return multiple copies of the same TempOffender record. That's probably why the SQL is failing. Also "cn" in the last statement below should be your connection which I think you called "conQry" Richard. Quote:
>> When I sent my previous reply, I couldn't see you original post. I >> then found in another group that you had posted some source code. >> > UPDATE ttblOffender INNER JOIN TempOffender ON >> > ttblOffender.lngOffForeignSysID = TempOffender.lngMaster_Name_Link SET >> > TempOffender.lngJWAN_ID = [ttblOffender]![lngJwan_ID] >> > WHERE (((TempOffender.lngJWAN_ID)=0)); >> You have a one to many join here, and you are updating a field in the >> "many" table. >> I could imagine that not working. >> If you can live with a "do until rs.EOF .... loop" type statement, >> you could open a recordset "rs" from a query like: >> " SELECT DISTINCT TempOffender.lngMaster_Name_Link, " & _ >> " [ttblOffender]![lngJwan_ID], FROM ttblOffender INNER JOIN " & _ >> " TempOffender ON ttblOffender.lngOffForeignSysID = " & _ >> "TempOffender.lngMaster_Name_Link " & _ >> " WHERE (((TempOffender.lngJWAN_ID)=0));" >> and for each row of the recordset, run >> cn.execute "UPDATE Projects SET lngJWAN_ID = " & _ >> cstr(rs!TempOffender.lngMaster_Name_Link) & _ >> " WHERE lngMaster_Name_Link = & _ >> " & rs!ttblOffender.lngOffForeignSysID >> I could easily have made a typing mistake in the above, so please >> check. I am assuming that the ID's and Links as numeric. if they are >> strings, you will have to add the appropriate single quotes to this >> UPDATE statement. >> Richard.
|
Sat, 08 Nov 2003 01:20:30 GMT |
|
 |
Richar #12 / 12
|
 [ODBC Microsoft Access Driver] ODBC--call failed.
On Mon, 21 May 2001 12:58:10 -0400, "Rick Toner" Quote:
>The code was provided at the top level, I'm not using a recordset just an >update statement. I'm using ODBC insted of JET 4.0 because i am using >stored procedures and it works alot beter through jet then JET, I would have >to use ADOX if i used the JET OLEDB Provider. This app runes off jet and >SQL depending of platform. >Rick
Procedures are easier with ODBC. I am not sure about better. Is using ADOX such a problem anyway? MS split DAO functionality into three parts in ADO in an attenpt to make the ADO components leaner. It is not such a cost using ADOX. From memory, you do not need ADOX if you know the parameters in advance - ie you take your ADODB command object and add Parameters that match the stored procedure's parameters. You do need ADOX if you want VB to automatically add the correct Parameters collection to the command object. Doing it this way does slow VB down considerably because to retrieve the parameters from Access, it ignores any parameter definitions that you may have done in Access and seems to more or less run the procedure/query so it can resolve the field names that are the parameters. The only real advantage of using the ADOX approach, as far as I can see, is that you have less work if you change the stored procedure - ie with ADOX, all you have to change is a single assignment line in code when you change a parameter. Without ADOX, you have to set the right parameter name, type and value. I would suspect that the ADOX-less way of running a procedure is at least as fast as ODBC. Everything else does work much better under ADO OLEDB. Richard.
|
Sat, 08 Nov 2003 01:55:32 GMT |
|
|
|