How to release a file on server

From: Davy (Davy_at_discussions.microsoft.com)
Date: 10/21/04


Date: Thu, 21 Oct 2004 15:07:01 -0700

I'm updating records in a file on an AS/400, then I'd like to release the
file for an AS/400 process to have exclusive use of it. When I close the
recordset, the file on the AS/400 remains locked. The only way I've found to
release it is to close the connection, but then upon reopening the connection
later, the recordsets under it have lost their information. (I've reset their
.source & .acctiveconnection, but am having trouble with the parameters).

I'm wondering if there's a way to force the command/recordset to release the
AS/400 file without closing the whole connection? And if not, should I be
skipping the data environment for the connection/recordsets in question and
setting them up in code to control them better?

Sorry if these questions are dumb - I need to get me some formal VB
education some day.

Using VB6, DataEnvironment (using SQL statements in the commands), IBM's
AS/400 ODBC. Tried both client & server cursors, optimistic/pessimistic
update, etc. Would try not using recordset-returning if I knew how.



Relevant Pages

  • Re: help with Data Environment Connection String help?
    ... > I am New to using data environment, ... the user can specify the path of the database. ... If the initialization doesn't get a valid connection, ... string in the data environment and if so,>data report as well, so when it ...
    (microsoft.public.vb.database)
  • Re: data environment error..
    ... - Tick Mark the option labeled "Share Connection" ... > I'm having a strange problem with the data environment on a form. ... What does hstmt mean? ...
    (microsoft.public.fox.vfp.forms)
  • RE: ADO/SQL/Connection performance issues
    ... I think our problem is mostly with read-only recordsets ... > through a "common" connection that is used in an object that is passed into ... > When the code is rewritten to eliminate the Data Environment or "shared" ...
    (microsoft.public.data.ado)
  • "Invalid Data Source" error when opening a data report.
    ... I have created a data environment with a connection and a command under that ... connection in it. ... When I click on the '+' sign besides that command in the ... Now when I try to run this report, it gives me an error saying ...
    (microsoft.public.vb.general.discussion)
  • Re: ADO/SQL/Connection performance issues
    ... This is why best design uses next strategy: open connection, get data, close ... Do not keep may opened connections and do not keep multiple ... is no reason to keep connected recordsets against opened connection. ... > When the code is rewritten to eliminate the Data Environment or "shared" ...
    (microsoft.public.data.ado)