VB-Access-Sybase. ODBC call fails.

VB-Access-Sybase. ODBC call fails.

Post by David Jian » Sat, 02 Nov 1996 04:00:00



Hi,  My program (VB4 32 bits) connects to a Sybase through linked table in
Access.
It has no problem for regular updates until it wants to do BEGINTRANS and
COMMITTRANS which caused a connection problem (ODBC calls fail).

Here is my sample codes :  

workspace.BeginTrans                 '** start transaction.
workspace.Execute mysql           '** first sql call.
workspace.Execute mysql2         '** second sql call.
workspace.CommitTrans

Once I comment out the Tranaction lines (line 2 & 4),  it works fine.  

Can someone help me on this.

Thanks a lot.

 
 
 

VB-Access-Sybase. ODBC call fails.

Post by Adrian Vicker » Sun, 03 Nov 1996 04:00:00




Quote:> Hi,  My program (VB4 32 bits) connects to a Sybase through linked table
in
> Access.
> It has no problem for regular updates until it wants to do BEGINTRANS and
> COMMITTRANS which caused a connection problem (ODBC calls fail).

This may not be possible for you, but you could try encapsulating your SQL
statements in a parameterised stored procedure, using Sybase's transaction
handling instead.

Mail me if you need clarification/examples or if you think your case cannot
be done....

HTH
        Ade

 
 
 

1. [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

2. Oracle 'Inteligent' Agent (DBSNMP)

3. network questions

4. Access 97/SQL7.0 ODBC Call Failed Error

5. Fox Woes/from a MacSter

6. ODBC -- Call Failed error in Access

7. 19406-NC-GREENSBORO-IBM Mainframe-C++-Windows 95-DOS-Windows NT-Quest-PC-Programmer/Analyst

8. PLEASE HELP: ODBC - call failed - with Access 97 / SQL Server

9. SQL 7 & Access 97 - ODBC Call Failed

10. odbc call failed and Access Tables

11. ODBC call fails when done from Access