VB 5 and Informix ODBC
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Networking & sqlhosts Configuration
In my application I have a recordset object, and have done a MoveLast, and am trying to get the recordcount, and also trying to do a AbsolutePosition. It works fine if the number of records returned is low (1 - 90's), but if it is higher (100+) I get a record count of -1, and an absolute position of -1. I am using VB 5 and Informix. DSN_STRING = "ODBC;DSN=SNT;DB=db_test;HOST=astro;SERV=test1_ifx;SRVR=t01_tcp;PRO=onsoctcp;UID=odbc;PWD=321" Set m_dbDatabase = m_wsWorkSpace.OpenDatabase("SNT", False, True, DSN_STRING) Set m_rsRecordSet = m_dbDatabase.OpenRecordSet(xsSQL, dbOpenSnapshot) m_rsRecordSet.MoveLast xlCount = m_rsRecordSet.RecordCount Any thoughts? Sean E. Covel
this may be a red herring but I think that InterSolv's early 3.11 driver had a bug in it when it came to recordcounts giving spurious results (espec. knocking off o's from numbers). If you're using InterSolv's driver then maybe see if you need a patch.. One other thing I may have read or imagined equally is that the ADO record count methd is generally unreliable. I never experienced this myself. Anyway, this may all be lies my memory is not what it was. Sean Covel <scovel@cbsinc.com> wrote in message news:378609b3.68688438@news.snet.com... > In my application I have a recordset object, and have done a MoveLast, > and am trying to get the recordcount, and also trying to do a > AbsolutePosition. It works fine if the number of records returned is > low (1 - 90's), but if it is higher (100+) I get a record count of -1, > and an absolute position of -1. > > I am using VB 5 and Informix. > > DSN_STRING = > "ODBC;DSN=SNT;DB=db_test;HOST=astro;SERV=test1_ifx;SRVR=t01_tcp;PRO=onsoctcp ;UID=odbc;PWD=321" > Set m_dbDatabase = m_wsWorkSpace.OpenDatabase("SNT", False, True, > DSN_STRING) > Set m_rsRecordSet = m_dbDatabase.OpenRecordSet(xsSQL, dbOpenSnapshot) > m_rsRecordSet.MoveLast > xlCount = m_rsRecordSet.RecordCount > > Any thoughts? > > Sean E. Covel