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
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?
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?
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.
Re: VB project to access database Errors
what could it be if they only there session open?
and noone else does?
Re: VB project to access database Errors
Quote:
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..
Quote:
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
Quote:
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