Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have closed the recordset and connection before you use it </p> <p><strong>rs closed here</strong></p> <pre><code> rs.Close </code></pre> <p><strong>and the connection is closed here</strong></p> <pre><code> cnn.Close Me.Liste_choix.RowSourceType = "Table/List" </code></pre> <p><strong>rs used here</strong></p> <pre><code>Me.Liste_choix.Recordset = rs </code></pre> <p><strong>Update</strong> From the <a href="http://msdn.microsoft.com/en-gb/library/windows/desktop/ms675814(v=vs.85).aspx" rel="nofollow noreferrer">docs</a>:</p> <blockquote> <p>Using the Close method to close a Connection object also closes any active Recordset objects associated with the connection. A Command object associated with the Connection object you are closing will persist, but it will no longer be associated with a Connection object; that is, its ActiveConnection property will be set to Nothing. Also, the Command object's Parameters collection will be cleared of any provider-defined parameters.</p> <p>Using the Close method to close a Recordset, Record, or Stream object releases the associated data and any exclusive access you may have had to the data through this particular object. You can later call the Open method to reopen the object with the same, or modified, attributes. While a Recordset object is closed, calling any methods that require a live cursor generates an error.</p> </blockquote> <p><strong>SQL INJECTION</strong> There is also an <a href="http://en.wikipedia.org/wiki/SQL_injection" rel="nofollow noreferrer">sql injection</a> risk by building sql directly from user input.<br> This question (<a href="https://stackoverflow.com/questions/6572448/msaccess-prepared-statements">MS Access prepared statements</a>) shows how to use a parametrised query - might be worth a look.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload