[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::odbc_rdb_driver

Title:DEC ODBC Driver
Notice:DEC ODBC Driver V2.0 Now Available
Moderator:SQLSRV::MAVRIS
Created:Tue Dec 29 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1357
Total number of notes:4864

1289.0. "FETCH_NEXT does not work properly (he says)" by chsr38.ch.oracle.com::ROHR (Oracle Rdb support Switzerland) Wed Jan 22 1997 09:36

T.RTitleUserPersonal
Name
DateLines
1289.1probably a coding error...M5::JBALOGHWed Jan 22 1997 10:3324
1289.2example...M5::JBALOGHWed Jan 22 1997 10:39230
1289.3chsr38.ch.oracle.com::ROHROracle Rdb support SwitzerlandWed Jan 22 1997 11:129
1289.4Program does not workchsr38.ch.oracle.com::ROHRThe Packers did it!Mon Feb 03 1997 08:3615
    Customer upgraded to ODBC 2.1 and the program does not work. It seems
    that the program bombs with the SQlExtendedFetch and says driver not
    capable. I am waiting for a log.
    
    Customer (and me too) wants to know where there is more documentation 
    about what is supported in SQLExtendedFetch (The ODBC help only talks about
    SQL_FETCH_NEXT, not about SQL_FETCH_ABSOLUTE which is used in the
    program).
    
    Was this program tried on 3.1? I don't have 3.1 and even if I had, I
    have no compiler...
    
    Thanks for a more thorough documentation pointer,
    Regina
     
1289.5What about the .h files?chsr38.ch.oracle.com::ROHRThe Packers did it!Mon Feb 03 1997 09:389
    Also, your program does #includes on sql.h and sqlext.h.  I don't have
    these files, I only have SQRDB.H which seems to contain Rdb Odbc
    specific stuff.
    
    Are we missing files?
    
    Thanks,
    Regina
    
1289.6SQLGetInfo...M5::JBALOGHMon Feb 03 1997 13:5519
    SQL.H and SQLEXT.H are included in the ODBC SDK available from
    Microsoft. 
    
    I just tried making an SQLExtendedFetch call with Fetch_absolute and it
    returned driver not capable. I am always making changes to programs I
    have around so I must have been testing something and didn't save the
    original...
    
    The calls that are supported listed in the ODBC driver help. Normally,
    an application makes SQLGetInfo calls into the driver to find out what
    it is capable of. In this case, the parameter to send in is
    SQL_FETCH_DIRECTION. This call returns SQL_FD_FETCH_NEXT. The section
    in help that discusses this is in the "Oracle ODBC Driver for Rdb
    Features". It indicates that the supported fetch direction is next. 
    
    Hope this helps. Sorry to stear you the wrong direction with
    FETCH_ABSOLUTE...
    
    John     
1289.7More questions?CHSR38::ROHRThe Packers did it!Thu Feb 06 1997 11:1620
    I am not finished with my painful ODBC programming issue.
    
    1) Customer wonders why SQLAnywhere has a fetch_prior and a scroll forward
    and backward function and the expensive Rdb product not.
    
    2) It seems that the scroll options in the Rdb ODBC driver are only valid
    for list elements?
    
    3) how do you go backward in your selection with Rdb ODBC without fetch
    prior or previous or whatever you call it?
    
    4) How do you address 'absolute' with Rdb ODBC? Like go to record n in
    my selection?
    
    I am really lost with this.
    Thanks,
    Regina
    
    
    
1289.8UKVMS3::PJACKSONOracle UK Rdb SupportFri Feb 07 1997 05:0325
>    1) Customer wonders why SQLAnywhere has a fetch_prior and a scroll forward
>    and backward function and the expensive Rdb product not.
    
    Because it is not part of standard SQL, nor part of the relational
    algebra ideas that inspired SQL.
    
>    2) It seems that the scroll options in the Rdb ODBC driver are only valid
>    for list elements?
    
    As they are in Rdb's SQL
    
>    3) how do you go backward in your selection with Rdb ODBC without fetch
>    prior or previous or whatever you call it?
    
>    4) How do you address 'absolute' with Rdb ODBC? Like go to record n in
>    my selection?
    
    These can't be done directly by ODBC, since SQL doesn't support them,
    but it is easy to code around them.
    
    I believe the proposed SQL3 standard includes this functionality, so it
    is likely to be added to Rdb sometime, but I have no knowledge of plans
    to do so (which does not mean that there are none).
    
    Peter
1289.9ORAREP::HERON::GODFRINDOracle Rdb EngineeringFri Feb 07 1997 05:1224
>    1) Customer wonders why SQLAnywhere has a fetch_prior and a scroll forward
>    and backward function and the expensive Rdb product not.
>    
>    2) It seems that the scroll options in the Rdb ODBC driver are only valid
>    for list elements?

Rdb does not have scrolling table cursors. Scrolling is only possible for list
cursors.
    
>    3) how do you go backward in your selection with Rdb ODBC without fetch
>    prior or previous or whatever you call it?

I guess you have to close that cursor and open another one ... Or have the
application keep track of the rows it returned and implement its own scrolling.

I am surprised this issue bothers that particular customer when others don't
seem to mind... 

>    4) How do you address 'absolute' with Rdb ODBC? Like go to record n in
>    my selection?

You don't.

/albert
1289.10CHSR38::ROHRThe Packers did it!Fri Feb 07 1997 06:417
    Puh, I don't know either why this customer is so insisting. Maybe
    he knows even less about ODBC programming than I do...
    
    When is the next ODBC programming course? What? There is none?
    
    Thanks for all your comments,
    Regina
1289.11On the wishlistUKVMS3::PJACKSONOracle UK Rdb SupportFri Feb 07 1997 06:515
    According to RDB_WISHLIST note 612, scrollable cursors are in SQL92 and
    on the wishlist for Rdb. Maybe you should add a vote on your customer's
    behalf.
    
    Peter
1289.12common practice...M5::JBALOGHFri Feb 07 1997 09:2010
    Many ODBC products such as MS Access, VB, etc fetch in a series of
    unique keys and walk up/down or go to an absolute record in the list.
    If the rest of the record is needed, they refetch it based on the
    unique key. 
    
    If the key list is too big to fit in memory, they buffer it to a file.
    
    I will leave the other questions alone.. :)
    
    John
1289.13CHSR38::ROHRThe Packers did it!Fri Feb 07 1997 09:4715
    John,
    
    So SQLAnyWhere (which has fetch prior or fetch previous and scrolling) is
    in fact translating this internally, getting the bunch of records and
    building up a key list in memory or in a file depending of the size in
    order to be able to do its scrolls and previous?.
    
    So the customer has to build that stuff on his own or use D2000 (as an
    example)?
    
    He is using Visual C++. Does Visual C++ belong to the products you
    mentionned in .12?
    
    /Regina
                      
1289.14heard of it but don't know anything about it...M5::JBALOGHFri Feb 07 1997 12:4410
    I really don't know anything about SQLAnywhere so I cannot comment on
    how they are implementing this scroll stuff. Is SQLAnywhere a DB engine
    or ODBC front end? 
    
    At this point in time, if they want backwards or absolute fetching,
    they are going to have to implement some of it themselveves. This
    should not be that difficult. Seems to me that some of the MFC objects
    do some of this but I am not sure...
    
    John