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.