Results 1 to 6 of 6

Thread: VB project to access database Errors

  1. #1

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    VB project to access database Errors

    Hello everyone,
    I created a simple VB project that holds customer data, and it connects to a access database, the database is located on a shared network drive.

    i packaged up the vb project with the package wizard, and put it on the network drive, then i went over to a friends computer and installed it, running the install.exe..

    I can open up the program, it seems to pull data from the database, but when i try to update a record it says "

    Run-time error 3021
    Either BOF or EOF is True, or the current reocord has been delted. Requested operation requires a current record.

    The update button works on my computer, but not hers?

    ANy ideas
    Thanks
    Joe

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB project to access database Errors

    Quote Originally Posted by joefox
    Hello everyone,
    I created a simple VB project that holds customer data, and it connects to a access database, the database is located on a shared network drive.

    i packaged up the vb project with the package wizard, and put it on the network drive, then i went over to a friends computer and installed it, running the install.exe..

    I can open up the program, it seems to pull data from the database, but when i try to update a record it says "

    Run-time error 3021
    Either BOF or EOF is True, or the current reocord has been delted. Requested operation requires a current record.

    The update button works on my computer, but not hers?

    ANy ideas
    Thanks
    Joe
    Do you have the database open from your machine at the same time you are trying to do an update from hers?

  3. #3

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    Re: VB project to access database Errors

    I tried to have it open both at the same time, on mine and hers, but it still gave same message. So i closed mine down, and tried to see if it would work, and it still gave the same message.

    However it will update the info just fine on mine..
    Is there a way to make more then 1 person on a access database at 1 time?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB project to access database Errors

    Quote Originally Posted by joefox
    Is there a way to make more then 1 person on a access database at 1 time?
    There may be, but I've never gotten it to work properly.

  5. #5

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    Re: VB project to access database Errors

    what could it be if they only there session open?
    and noone else does?

  6. #6
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: VB project to access database Errors

    Run-time error 3021
    Either BOF or EOF is True, or the current reocord has been delted. Requested operation requires a current record.
    try debug the program at ur friend's computer if possible..

    the error usually ur friend display a record, but before ur friend update it someone has deleted it..or the logic at ur code is wrong.. u not 'move' the recordset to current record position which being updated..

    Is there a way to make more then 1 person on a access database at 1 time
    if that is the case..why u want to make it as Client/Server? i think what u mean record locking?
    From MSDN
    Types of Locks
    adLockBatchOptimistic
    Indicates optimistic batch updates. Required for batch update mode.

    Many applications fetch a number of rows at once and then need to make coordinated updates that include the entire set of rows to be inserted, updated, or deleted. With batch cursors, only one round trip to the server is needed, thus improving update performance and decreasing network traffic. Using a batch cursor library, you can create a static cursor and then disconnect from the data source. At this point you can make changes to the rows and subsequently reconnect and post the changes to the data source in a batch.

    adLockOptimistic
    Indicates that the provider uses optimistic locking—locking records only when you call the Update method. This means that there is a chance that the data may be changed by another user between the time you edit the record and when you call Update, which creates conflicts. Use this lock type in situations where the chances of a collision are low or where collisions can be readily resolved.

    adLockPessimistic
    Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately before editing. Of course, this means that the records are unavailable to other users once you begin to edit, until you release the lock by calling Update. Use this type of lock in a system where you cannot afford to have concurrent changes to data, such as in a reservation system.

    adLockReadOnly
    Indicates read-only records. You cannot alter the data. A read-only lock is the "fastest" type of lock because it does not require the server to maintain a lock on the records.

    adLockUnspecified
    Does not specify a type of lock.
    hope it can help

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width