Re: Visual Basic and PostgreSQL ODBC - Mailing list pgsql-general

From martin.chantler@convergys.com
Subject Re: Visual Basic and PostgreSQL ODBC
Date
Msg-id OFE7C59B3F.F9A23D8C-ON80256A96.005E8F29@cbis.com
Whole thread Raw
In response to Visual Basic and PostgreSQL ODBC  ("Ryan C. Bonham" <Ryan@srfarms.com>)
List pgsql-general
Hi,
Firstly why not issue a DELETE FROM tablename statement
to delete all records, e.g.
db.execute "DELETE FROM xxx"

If that is not what you want to do then I think you need to
issue a Refresh event, e.g. rstRecord2.Refresh
I think this will cause the RecordCount to be re-calculated

Good luck

MC.







"Ryan C. Bonham" <Ryan@srfarms.com>@postgresql.org on 27/07/2001 17:59:36

Sent by:  pgsql-general-owner@postgresql.org


To:   pgsql-odbc@postgresql.org
cc:   pgsql-general@postgresql.org
Subject:  [GENERAL] Visual Basic and PostgreSQL ODBC


Hi,


Ok I have a problem, that I need to find a fix or workaround for. I have a
Visual Basic 6 application that calls on a PostgreSQL database. I have code
that calls a table and runs a loop on it, deleting recordsets until the
recordcount equals a certain number.. The code deletes the records fine,
the
problem is the recordcount doesn't change.. Does anyone know what is going
on and how to fix it?  Thank you


Ryan

VB CODE

        rstRecord2.MoveFirst
    Do Until rstRecord2.RecordCount = 0
        rstRecord2.Delete
       rstReocrd2.MoveNext
        Debug.Print rstRecord2.RecordCount
    Loop


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



pgsql-general by date:

Previous
From: "Ryan C. Bonham"
Date:
Subject: Visual Basic and PostgreSQL ODBC
Next
From: Carlos Felipe Zirbes
Date:
Subject: RE: Visual Basic and PostgreSQL ODBC