Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Current Record (Error 3021)

Status
Not open for further replies.

phummel

Programmer
Mar 31, 2000
5
CA
I have a unique situation.  I have a VB5 sales app using an MS Access DB via the MSJet DBEngine.  The app runs fine in Win95.  But a second PC running Win98 that is networked to the Win95 PC and is running mapped to the app on the Win95 PC.  They are sharing disk drives.  The app on the Win98 generaly runs fine, but on occasions gets the 3021 No Current Record error when selecting sales from the DB on the Win95 PC.  There is no problem accessing the sales from the 95 PC.  The sales are selected from a DBGrid control.  I trap the error and display a message showing the error.  Has anyone run into situation with sharing apps under such conditions, or can provide any suggestions with what may be going wrong.  I'm wondering if it is a compatability issue with the DBGrid and Win98.  The DBGrid is not the standard Grid with VB5, it is the True DBGrid Standard Edition 1.0e 32-bit version from Apex.
 
<br>&nbsp;I have run into the same type of error. I cannot recall the actual error, but this might help anyway. The error was generated when I tried to open the Access Database from two different sources at one time. Could this be the problem you are having?? Both systems are trying to gain access to the same data at once from the database.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hope this helps,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John Stephens<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
Thanks for the info, but I believe I have the multi user access to the database covered.&nbsp;&nbsp;When one user attempts to gain update access to the same database Page that another user currently has a row in Edit I trap the 3260 Error &quot;Couldn't update; currently locked by user &lt;name&gt; on machine &lt;name&gt;&quot; and display a message.&nbsp;&nbsp;I have tested this by running multipe sessions of the same program on my own PC and successfully trapped the error.&nbsp;&nbsp;It also works on the multiple PC running the same program via the mapping by the disk sharing that is occuring.<br><br>Now you are making wonder if maybe Win98 may have different interpretations of the DBEngine/Microsoft Jet DAO Errors then Win95.&nbsp;&nbsp;The 3021error even appears when the Win98 PC is the only one running the app off of the Win95.<br><br>Again, thanks for the info.<br>
 
Might wanna check that the recordset has data, EOF and BOF are not true. Before populating the grid.<br><br>Also regards to locking , if youre using Access97 and version before that then remeber that it uses 2K page locking therefore a user might access a record and put a lock on it, it is not uncommon then that other records on the page could get locked at the same time.<br><br>A good workaround is to make your table record sizes a total of 2046 this way you will get true record locking and not page locking, not sure if this helps
 
If anyone is interested, the problem to the No Current Record (Error 3021) where 2 PCs are sharing the same database over a drive sharing network turned out to be a Windows Date Setting.&nbsp;&nbsp;Since the database primary key is a combination of a Autonumber column and an Entry date Timestamp, one of the PCs had the Windows Date Setting as mm/dd/yy and the other as dd/mm/yy, when the second PC attempted to show as Sale whose date portion of the timestamp was Octoboer 1, 1999 (10/01/99) it thought the date was January 10, 1999 (10/01/99), thus the sale was not found because the Regional Setting Date format was different then that of Timestamp format that the sale was enter as.<br><br>Thanks to those that attempted to help me with this problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top