|
Home > Archive > Programming with dBASE > March 2006 > VDB 5.7 Record lock issue
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
VDB 5.7 Record lock issue
|
|
| Eddie Muniz 2006-03-07, 8:23 pm |
| OK,
This one is driving me NUTS, I have a 5.7 APP that is running on a network,
but every so often any station running the APP generated a RECORD LOCK error
on RECORD 1 of one of the TABLES, I have looked through the FORMS that are
involved and in no place am I locking (rlock() ) any record in that file.
anybody have any clue ????
I was just reading a previous thread about something of setting the RUN IN
OWN MEMORY SPACE property. Would this do anything and if so how the heck
do I set this for my end user running the aPP ????
Eddie Muniz
| |
| Richard Perryman 2006-03-08, 9:23 am |
| Eddie Muniz wrote:
> This one is driving me NUTS, I have a 5.7 APP that is running on a network,
> but every so often any station running the APP generated a RECORD LOCK error
> on RECORD 1 of one of the TABLES, I have looked through the FORMS that are
> involved and in no place am I locking (rlock() ) any record in that file.
> anybody have any clue ????
>
Go into the BDE and make sure each workstation has "local share" is
true. If you have multiple users accessing the same table - like in a
browse, then you probably will get record locking. Using a "one record
at a time approach" in a form where you can control adding, editing,
etc... is best. Even in dbase plus you can get record locks. I use to
use browse object a lot and people would insert a blank row or start to
edit a row and go to the bathroom - leaving a lock on the record. To
speed up data entry, recently i've been having a "work folder" on each
workstation where each person enters there data with a "post" button
that posts there work to the server. This has speed up and removed
record locks "at least in my situtation" greatly.
| |
| Eddie Muniz 2006-03-08, 8:23 pm |
| Thanks, I thought I had them all set to LOCAL SHARE = .t. I will check
them again tomorrow when they open the office. But I was pretty sure that
I had set this already.
The funny thing is that it always shows the LOCK on the same Table and the
lock is always on RECORD 1, which record I have no reason to manually lock.
I will check tomorrow but I think there may be some other problem.
I would hate to have a local entry and then an update to the server.
Let me know if anyone else can think of what may be causing this. By the
way it has been happening for a while, I have just continuously blamed the
network trying to buy time to figure this out but I am getting frustrated
since it does not seem to be a problem anywhere in the code.
Eddie
"Richard Perryman" < richard@vipindustrie
s.com> wrote in message
news:UzDSe0rQGHA.1148@news-server...
> Eddie Muniz wrote:
>
> Go into the BDE and make sure each workstation has "local share" is true.
> If you have multiple users accessing the same table - like in a browse,
> then you probably will get record locking. Using a "one record at a time
> approach" in a form where you can control adding, editing, etc... is best.
> Even in dbase plus you can get record locks. I use to use browse object a
> lot and people would insert a blank row or start to edit a row and go to
> the bathroom - leaving a lock on the record. To speed up data entry,
> recently i've been having a "work folder" on each workstation where each
> person enters there data with a "post" button that posts there work to the
> server. This has speed up and removed record locks "at least in my
> situtation" greatly.
| |
| Richard Perryman 2006-03-09, 9:23 am |
| Eddie Muniz wrote:
>
> The funny thing is that it always shows the LOCK on the same Table and the
> lock is always on RECORD 1, which record I have no reason to manually lock.
> I will check tomorrow but I think there may be some other problem.
>
If it happens when they first open the table - maybe you should look for
an "on open event" that may be doing something to the record.
| |
| Eddie Muniz 2006-03-09, 8:23 pm |
| Richard it does not happen on the ONOPEN event, I have checked ALL events,
ONOPN, ONCLOSE, ADD, EDIT etc..... EVERYTHING, this has to be a language or
BDE setting I imagine.
I just checked all the workstations running the program and they all have
SET LOCAL SHARE = TRUE.
I am really getting frustrated with these silly, unexplainable errors.
HELP HELP HELP, I have a pissed off customer and all I have is excuses to
offer them.
Eddie Muniz
"Richard Perryman" < richard@vipindustrie
s.com> wrote in message
news:CiaBDD4QGHA.560@news-server...
> Eddie Muniz wrote:
> If it happens when they first open the table - maybe you should look for
> an "on open event" that may be doing something to the record.
| |
| Richard Perryman 2006-03-09, 8:23 pm |
| Eddie Muniz wrote:
>
> HELP HELP HELP, I have a pissed off customer and all I have is excuses to
> offer them.
>
Oh man - I hate when that happens. I don't know if I could help. Would
it be possible to post a small portion of code or what do they call it "
a turn key program" that maybe me and/or some better programmers here
could look at? Of course if it's in the bde, then that will not help.
What u might do is uninstall the bde and then reinstall it to its defaults.
| |
| Eddie Muniz 2006-03-09, 8:23 pm |
| The record lock always happens on the same file
CMNTRX.DBF
Record1
Now I noticed that if I leave the error on the screen for a period of time,
eventually it clears itself and then allows the user to continue.
If you press CANCEL it just loops and continues with the RECORD LOCK error
on screen and does not allow you to exit.
ARGHHHHHH
Eddie
"Eddie Muniz" <eddie0605@bellsouth.net> wrote in message
news:HI93LL7QGHA.592@news-server...
> Richard it does not happen on the ONOPEN event, I have checked ALL
> events, ONOPN, ONCLOSE, ADD, EDIT etc..... EVERYTHING, this has to be a
> language or BDE setting I imagine.
>
> I just checked all the workstations running the program and they all have
> SET LOCAL SHARE = TRUE.
>
> I am really getting frustrated with these silly, unexplainable errors.
>
> HELP HELP HELP, I have a pissed off customer and all I have is excuses to
> offer them.
>
> Eddie Muniz
>
>
>
> "Richard Perryman" < richard@vipindustrie
s.com> wrote in message
> news:CiaBDD4QGHA.560@news-server...
>
>
| |
| Eddie Muniz 2006-03-09, 8:23 pm |
| I am going to try to take the important file hadling snippets but it wont be
easy, this is a complex form that handles about 14 tables, all relational.
Eddie
"Eddie Muniz" <eddie0605@bellsouth.net> wrote in message
news:HI93LL7QGHA.592@news-server...
> Richard it does not happen on the ONOPEN event, I have checked ALL
> events, ONOPN, ONCLOSE, ADD, EDIT etc..... EVERYTHING, this has to be a
> language or BDE setting I imagine.
>
> I just checked all the workstations running the program and they all have
> SET LOCAL SHARE = TRUE.
>
> I am really getting frustrated with these silly, unexplainable errors.
>
> HELP HELP HELP, I have a pissed off customer and all I have is excuses to
> offer them.
>
> Eddie Muniz
>
>
>
> "Richard Perryman" < richard@vipindustrie
s.com> wrote in message
> news:CiaBDD4QGHA.560@news-server...
>
>
| |
| Eddie Muniz 2006-03-13, 11:23 am |
| OK IM DESPERATE,
here is a the code for one of the sub-forms being called which is the only
place that handles any file locking of the file named CMNTRX which is where
I am getting that RECORD lock on RECORD # 1 of CMNTRX.
HELP HELP HELP, I am at a loss for this one. Hope I dont get reprimanded
for such a long post
Eddie Muniz
Here are the calling commands of the bottom form.
********************
**************
Procedure EDITRXBUTT_OnClick
********************
**************
set procedure to rxedit.wfm additive
form.rxedit = new rxeditform()
form.rxedit.rxtype = trim(form.rec_cmtyp.value)
form.rxedit.topmost = .t.
form.rxedit.mdi = .f.
form.rxedit.rxseq = form.rec_cmseq.value
form.rxedit.patid = patfile->pat_num
form.rxedit.parentref = form
form.rxedit.readmodal()
form.rxedit.release()
close procedure rxedit.wfm
********************
**************
Procedure NEWCMNBUTT_OnClick
********************
**************
set procedure to rxedit.wfm additive
form.rxedit = new rxeditform()
form.rxedit.rxtype = trim(form.rec_cmtyp.value)
form.rxedit.topmost = .t.
form.rxedit.mdi = .f.
form.rxedit.rxseq = 0
form.rxedit.patid = patfile->pat_num
form.rxedit.parentref = form
form.rxedit.readmodal()
form.rxedit.release()
close procedure rxedit.wfm
********************
********************
********************
****
* RXEDIT.WFM
CLASS RXEDITFORM OF FORM
this.TopMost = .T.
this.Text = "Form"
this.AutoSize = .T.
* this.AutoCenter = .T.
this.Left = 2
this.Top = 2
this.ColorNormal = "N"
this.EscExit = .F.
this.sizeable = .t.
Procedure Open
form.init()
return super::Open()
Procedure Readmodal
form.init()
return super::readmodal()
Procedure Init
form.textcontrols=new Array()
form.editcontrols=new Array()
form.aQuesArray=new array()
form.aQuesArray.grow(2)
form.aQuesArray.grow(2)
form.aQuesArray.grow(2)
form.aQuesArray.grow(2)
set century on
arraynum = 0
select cmnques
goto top
* msgbox(form.rxtype)
scan
if rx_form = form.rxtype .or. rx_form = "ALL "
arraynum = arraynum + 1
form.aQuesArray.grow(1)
form.aQuesArray[arraynum,1]= RX_QUES
form.aQuesArray[arraynum,2]= RX_PICT
form.aQuesArray[arraynum,3]= RX_LEN
form.aQuesArray[arraynum,4]= RX_VAL
form.aQuesArray[arraynum,5]= RX_LINK
endif
endscan
form.text = "PRESCRIPTION TYPE :" + trim(form.rxtype)
clear
for n=1 to arraynum
form.textcontrols.add(1)
form.textcontrols[form.textcontrols.size]= new text(form)
form.textcontrols[form.textcontrols.size].FontName = "Courier"
form.textcontrols[form.textcontrols.size].Bold = .t.
form.textcontrols[form.textcontrols.size].text=replicate(".",107)
form.textcontrols[form.textcontrols.size].top=n-1
form.textcontrols[form.textcontrols.size].left=2
form.textcontrols[form.textcontrols.size].width=102
form.textcontrols[form.textcontrols.size].colornormal="W+/N"
form.textcontrols[form.textcontrols.size].FontSize = 10
form.textcontrols.add(1)
form.textcontrols[form.textcontrols.size]= new text(form)
form.textcontrols[form.textcontrols.size].Bold = .t.
templen = len(trim(form.aQuesArray[n,1]))
form.textcontrols[form.textcontrols.size].text=trim(form.aQuesArray[n,1])
form.textcontrols[form.textcontrols.size].top=n-1
form.textcontrols[form.textcontrols.size].left=2
form.textcontrols[form.textcontrols.size].colornormal="W+/N"
form.textcontrols[form.textcontrols.size].FontName = "MS Sans Serif"
form.textcontrols[form.textcontrols.size].FontSize = 8
form.textcontrols[form.textcontrols.size].width= templen + 1
form.editcontrols.add(1)
form.editcontrols[form.editcontrols.size]= new entryfield(form)
if trim(form.aQuesArray[n,2]) = "##/##/##"
form.editcontrols[form.editcontrols.size].value=date()
else
form.editcontrols[form.editcontrols.size].value=space(form.aQuesArray[n,3])
form.editcontrols[form.editcontrols.size].width=form.aQuesArray[n,3]
+ 2
if form.editcontrols[form.editcontrols.size].width > 40
form.editcontrols[form.editcontrols.size].width=40
endif
endif
form.editcontrols[form.editcontrols.size].picture=form.aQuesArray[n,2]
form.editcontrols[form.editcontrols.size].top=n - 1
form.editcontrols[form.editcontrols.size].left =105
form.editcontrols[form.editcontrols.size].FontSize = 8
form.editcontrols[form.editcontrols.size].picture=form.aQuesArray[n,2]
if trim(form.aQuesArray[n,5]) <> "NONE"
form.editcontrols[form.editcontrols.size].datalink = "CMNTRX->" +
form.aQuesArray[n,5]
endif
if .not. empty(form.aquesarray[n,4])
form.editcontrols[form.editcontrols.size].validvalue =
form.aQuesArray[n,4]
else
form.editcontrols[form.editcontrols.size].validvalue = ""
endif
next
DEFINE PUSHBUTTON SAVEBUTT OF THIS;
PROPERTY;
Group .T.,;
Enabled .t.,;
Text "Save",;
OnClick Class::Savebutt_oncl
ick, ;
Top arraynum + 1,;
left 25,;
ColorNormal "N/N+",;
PageNo 0,;
Height 2.0586,;
FontSize 10,;
Width 17,;
UpBitmap "RESOURCE #20"
DEFINE PUSHBUTTON CANCBUTT OF THIS;
PROPERTY;
Group .T.,;
Enabled .t.,;
Text "Cancel",;
SpeedTip "Cancel Entry",;
OnClick CLASS::CANCBUTT_ONCL
ICK,;
StatusMessage "Cancel Entry",;
Top arraynum + 1,;
left 55, ;
ColorNormal "N/N+",;
PageNo 0,;
Height 2.0586,;
FontSize 10,;
Width 17,;
UpBitmap "RESOURCE #28"
DEFINE PUSHBUTTON FINDDIAG OF THIS;
PROPERTY;
Group .T.,;
Enabled .t.,;
Text "Diagnosis Lookup",;
SpeedTip "Look Up Diagnosis",;
OnClick CLASS::FINDDIAG_ONCL
ICK,;
StatusMessage "Look Up Diagnosis",;
Top arraynum + 1,;
left 85, ;
ColorNormal "N/N+",;
PageNo 0,;
Height 2.0586,;
FontSize 10,;
Width 17,;
UpBitmap "RESOURCE #858"
select cmntrx
if form.rxseq = 0
form.beginappend()
form.editcontrols[1].setfocus()
else
form.editcontrols[1].setfocus()
set order to tag cm_seqn
seek form.rxseq
if .not. found()
msgbox("Prescription # "+trim(str(form.rxseq,9,0)) + " Not Found")
form.close()
endif
form.editcontrols[1].setfocus()
endif
********************
***************
Procedure SAVEBUTT_OnClick
********************
***************
editcount = form.editcontrols.size
for n = 1 to editcount
if "CM_GU012" $ form.editcontrols[n].datalink .or. ;
"CM_GU013" $ form.editcontrols[n].datalink .or. ;
"CM_GU014" $ form.editcontrols[n].datalink .or. ;
"CM_GU015" $ form.editcontrols[n].datalink
if .not. empty(form.editcontrols[n].value)
tempdiag = trim(form.editcontrols[n].value)
select diag
seek tempdiag
if .not. found()
msgvalue = msgbox("Diagnosis (" +
trim(form.editcontrols[n].value) + ") Not On File, Add it ?","",36)
if msgvalue = 6
form.addflag = .f.
set procedure to codeadd.wfm additive
form.newdiag = new newdiagform()
form.newdiag.mdi = .f.
form.newdiag.parentform = form
form.newdiag.diagcode.value = form.editcontrols[n].value
form.newdiag.readmodal()
form.newdiag.release()
if form.addflag = .f.
form.editcontrols[n].setfocus()
select cmntrx
return
endif
else
form.editcontrols[n].setfocus()
select cmntrx
return
endif
endif
select cmntrx
endif
endif
if .not. empty(form.editcontrols[n].validvalue)
if .not. trim(form.editcontrols[n].value) $
trim(form.editcontrols[n].validvalue)
msgbox("INVALID ENTRY, MUST BE '" +
trim(form.editcontrols[n].validvalue)+ "'")
form.editcontrols[n].setfocus()
return
endif
endif
next n
select cmntrx
if form.rxseq = 0
select system
goto top
if .not. rlock()
msgbox("Unable to Lock System File To Update Last RX #")
form.close()
endif
nextrx = sys_lstrx + 1
replace sys_lstrx with nextrx
unlock
form.saverecord() && Commented out on 12/24/04
select cmntrx
form.saverecord()
rlock()
replace cm_seqn with nextrx
replace cm_formno with form.rxtype
replace cm_patn with form.patid
form.saverecord()
* unlock && Added on 12/23/04 PUT BACK on 03/01/2006
form.parentref.rec_cmseq.value = nextrx
else
form.saverecord()
unlock
endif
select recurr
form.release()
form.close()
********************
***************
Procedure CANCBUTT_OnClick
********************
***************
form.abandonrecord()
select recurr
form.release()
form.close()
********************
***************
Procedure FINDDIAG_OnClick
********************
***************
set procedure to codeadd.wfm additive
form.finddiagnosis = new finddiagform()
form.finddiagnosis.mdi = .f.
form.finddiagnosis.parentform = form
form.finddiagnosis.readmodal()
form.finddiagnosis.release()
ENDCLASS
| |
| *Lysander* 2006-03-13, 11:23 am |
| Eddie Muniz schrieb:
> I am getting that RECORD lock on RECORD # 1 of CMNTRX.
>
> HELP HELP HELP, I am at a loss for this one. Hope I dont get reprimanded
> for such a long post
No, it was even too short still :)
5.x is a looong time ago, but your code looks so pretty and sober,
it would just be a pity if it wouldn't run anymore.
One thing in advance, 5.x is really long ago for me: was it indeed
BDE was used with 5.x? I remember something that it was a 16-Bit
thingy called IDAPI or something like that.
Questions:
Since WHEN do you have this problem? I do not suppose that it was
from the beginning? So, what could have changed?
Which server-system is your client using? Maybe you are suddenly
suffering from an OPLocks-issue?
The "apparition" that suddenly the problem vanishes by itself after
some time looks exactly like an OPLocks-problem.
But it is just NOT possible that this starts to happen out of
nothing, when no changes to the server or network are made.
What is going on in the procedure "saverecord", as called in
"form.saverecord()" on several occasions?
Most important: On what LINE of code does the locking-conflict
happen exactly?
ciao,
André
| |
| Eddie Muniz 2006-03-13, 1:23 pm |
| Yes IDAPI,
The network environment is a PEER to PEER, one station serving as the
server, the local C drive is mapped on all stations. I am using TABLES not
a DATABASE and therefore no DATABASE server.
This did not just start happening, the thing is that just now I have
installed the system to a user whom is putting much more load on the system
than any of my previous, so now its become a daily issue rather than an
occasional problem which I could get away with.
The RECORD LOCK error is not being generated by my code it seems to be
generated by the BDE. Like you know funny thing is that the message seems
to clear itself if you wait a while, since I am not unlocking that can only
lead me to beleive that the BDE is locking it and then for some reason
delaying the UNLOCK.
I DONT KNOW anymore I am just simply FRUSTRATED. I am going to make some
other alterations and try them.
The form is simple, I am loading a bunch of Text, and controls into an
Array from a table, and then displaying for the user to edit, then writing
it back from the array. Elegant and effective but this locking thing has me
stumped. I may move the form over to the main form and try it that way so
that I dont have to ADD a procedure.
Like I said I am shooting in the dark here, I am stumped, I am hoping
someone can shed some light on this
Eddie
"*Lysander*" <nobody@nowhere.com> wrote in message
news:9mrfTOsRGHA.560@news-server...
> Eddie Muniz schrieb:
>
> No, it was even too short still :)
>
> 5.x is a looong time ago, but your code looks so pretty and sober, it
> would just be a pity if it wouldn't run anymore.
>
> One thing in advance, 5.x is really long ago for me: was it indeed BDE was
> used with 5.x? I remember something that it was a 16-Bit thingy called
> IDAPI or something like that.
>
> Questions:
> Since WHEN do you have this problem? I do not suppose that it was from the
> beginning? So, what could have changed?
>
> Which server-system is your client using? Maybe you are suddenly suffering
> from an OPLocks-issue?
> The "apparition" that suddenly the problem vanishes by itself after some
> time looks exactly like an OPLocks-problem.
> But it is just NOT possible that this starts to happen out of nothing,
> when no changes to the server or network are made.
>
> What is going on in the procedure "saverecord", as called in
> "form.saverecord()" on several occasions?
>
> Most important: On what LINE of code does the locking-conflict happen
> exactly?
>
> ciao,
> André
>
>
| |
| *Lysander* 2006-03-13, 1:23 pm |
| Eddie Muniz schrieb:
> Yes IDAPI,
Ah!
And that had indeed already "LOCALSHARE"??
Anyway... don't give up too early.
It's not over until the customer makes you kiss the dirt.
> The network environment is a PEER to PEER, one station serving as the
> server, the local C drive is mapped on all stations. I am using TABLES not
> a DATABASE and therefore no DATABASE server.
Which systems (XP, 9x, mixed)?
How many users in the P2P-network?
Is the "server"-station dedicated as server or is at the same time
somebody working with this station?
Some questions not yet answered:
[color=darkred]
ciao,
André
| |
| Eddie Muniz 2006-03-13, 1:23 pm |
|
"*Lysander*" <nobody@nowhere.com> wrote in message
news:wuSz3psRGHA.560@news-server...
> Eddie Muniz schrieb:
>
> Ah!
> And that had indeed already "LOCALSHARE"??
LOCALSHARE = .t. on all stations
>
> Anyway... don't give up too early.
> It's not over until the customer makes you kiss the dirt.
>
I have already begun kissing it seems
>
> Which systems (XP, 9x, mixed)?
> How many users in the P2P-network?
> Is the "server"-station dedicated as server or is at the same time
> somebody working with this station?
The server is also working as a station.
>
> Some questions not yet answered:
>
Not sure I understand your question.
Here is the SAVERRECORD ()
********************
****************
********************
***************
Procedure SAVEBUTT_OnClick
********************
***************
editcount = form.editcontrols.size
for n = 1 to editcount
if "CM_GU012" $ form.editcontrols[n].datalink .or. ;
"CM_GU013" $ form.editcontrols[n].datalink .or. ;
"CM_GU014" $ form.editcontrols[n].datalink .or. ;
"CM_GU015" $ form.editcontrols[n].datalink
if .not. empty(form.editcontrols[n].value)
tempdiag = trim(form.editcontrols[n].value)
select diag
seek tempdiag
if .not. found()
msgvalue = msgbox("Diagnosis (" +
trim(form.editcontrols[n].value) + ") Not On File, Add it ?","",36)
if msgvalue = 6
form.addflag = .f.
set procedure to codeadd.wfm additive
form.newdiag = new newdiagform()
form.newdiag.mdi = .f.
form.newdiag.parentform = form
form.newdiag.diagcode.value = form.editcontrols[n].value
form.newdiag.readmodal()
form.newdiag.release()
if form.addflag = .f.
form.editcontrols[n].setfocus()
select cmntrx
return
endif
else
form.editcontrols[n].setfocus()
select cmntrx
return
endif
endif
select cmntrx
endif
endif
if .not. empty(form.editcontrols[n].validvalue)
if .not. trim(form.editcontrols[n].value) $
trim(form.editcontrols[n].validvalue)
msgbox("INVALID ENTRY, MUST BE '" +
trim(form.editcontrols[n].validvalue)+ "'")
form.editcontrols[n].setfocus()
return
endif
endif
next n
select cmntrx
if form.rxseq = 0
select system
goto top
if .not. rlock()
msgbox("Unable to Lock System File To Update Last RX #")
form.close()
endif
nextrx = sys_lstrx + 1
replace sys_lstrx with nextrx
unlock
* form.saverecord() && Commented out on 03/13/2006
select cmntrx
form.saverecord()
rlock()
replace cm_seqn with nextrx
replace cm_formno with form.rxtype
replace cm_patn with form.patid
form.saverecord()
unlock && Added back on 03/13/2006
form.parentref.rec_cmseq.value = nextrx
else
form.saverecord()
unlock
endif
select recurr
* form.release() && COMMENTED OUT FOR FILE LOCKING ON 03/13/2006
form.close()
********************
********************
********************
*************8[color
=darkred]
It happens upon opening the MAIN form, when opening the tables in the QBE,
like I said the error is generated by DBASE it seems, it is not an error
message that my code is generating.
[color=darkred]
>
> ciao,
> André
THANKS !!
Eddie
| |
| Richard Perryman 2006-03-14, 9:23 am |
| What if you add "UNLOCK ALL" everytime "before" you use a table or
replace a record? I had a problem with a 5.7 app that I upgraded to
db2k "left the code as is" and that solved a problem for me. Just a
thought. It does not close your open files, just a shotgun method
releasing locks........
| |
| Eddie Muniz 2006-03-14, 9:23 am |
| Richard the problem is that the error happens on an another workstation that
is opening the same form that someone else is using, so it happens upon
opening the form, it would do me no good to unlock all at that point
because that is not the station that placed the LOCK that is causing the
error. I already tried a bunch of UNLOCK in different places and ended up
getting those VISUAL DBASE has become unstable errors. I may have to
completely redesign this thing just in an attempt to try something
different, I am stumped. Any other suggetions ANYONE
Eddie
"Richard Perryman" < richard@vipindustrie
s.com> wrote in message
news:H1smaG3RGHA.2320@news-server...
> What if you add "UNLOCK ALL" everytime "before" you use a table or replace
> a record? I had a problem with a 5.7 app that I upgraded to db2k "left
> the code as is" and that solved a problem for me. Just a thought. It
> does not close your open files, just a shotgun method releasing
> locks........
| |
|
| I seem to think that situation is caused by a bad index. Does the problem
only happen on the customers system or does it happen on yours as well? Can
you get a copy of the .dbf and .mdx and append the data into another table
of identical structure and use it instead of the original and see if that
helps? Another thing to try is to use the .qbe in a simple form that
doesn't do anything and see if the problem is still there. If it is still
there you know you it is not your code but the tables or the BDE setup. If
it is not there then start adding small amounts of code to the new form
until it fails. Start with the form_onOpen method if you have one.
HTH,
Ken
| |
| *Lysander* 2006-03-14, 9:23 am |
| Eddie Muniz schrieb:
> "*Lysander*" <nobody@nowhere.com> wrote in message
> The server is also working as a station.
Again: which systems?
it is a known problem, for example, that in mixed areas in
P2P-network the "SERVER" must be on the WinXP-station if there is a
mixed area of XP/9x.
> Not sure I understand your question.
you have the following lines of code in your example:
select cmntrx
form.saverecord()
rlock()
this is _IN_ the procedure savebutt_onclick
it is calling any function "form.saverecord()"
what is that saverecord() doing? maybe it is placing a lock and not
releasing it?
ciao,
André
| |
| Richard Perryman 2006-03-14, 11:23 am |
| Eddie Muniz wrote:
> Richard the problem is that the error happens on an another workstation that
> is opening the same form that someone else is using, so it happens upon
> opening the form, it would do me no good to unlock all at that point
> because that is not the station that placed the LOCK that is causing the
> error. I already tried a bunch of UNLOCK in different places and ended up
> getting those VISUAL DBASE has become unstable errors. I may have to
> completely redesign this thing just in an attempt to try something
> different, I am stumped. Any other suggetions ANYONE
>
I guess if it were me, I would rewrite it using db2k or dbase plus "just
that part of the program" if that would help them get going quicker.
Right now the most important thing is to please the customer. You might
have to stay up late & rewrite that part of the program using a
different approach or like I said using dbase plus.
| |
| Richard Perryman 2006-03-14, 11:23 am |
| Is the purpose of this form for "editing existing data" or is to "add
new data". If it's to add new data. One approach that I take on a
network, is I create a folder on each workstation and setup a routine in
the main program that.
1) Copies empty data input files into the work folder on the workstation
2) Changes the directory into that folder
3) Brings up a screen for them to enter there data
4) The form has a "post" button so they can add there new data back to
the server
This method makes it a lot faster for them "and no record locks whatsoever".
Just thought I'd mention it. I sure hope you find a solution soon.
Sorry I can be more help.
Thanks
Richard
| |
| Eddie Muniz 2006-03-14, 8:23 pm |
| Ken,
I have had trouble recreating the problem but I have seen it happen on there
system and it has happened sparingly on other customers systems that dont
have as much multi user use as this new customer. I have done a PACK and
REINDEX of the tables, I have used PACKs before to find trouble on Tables.
I am going to try to move the child for over into the parent form and remove
some of the calls to see if this works. Again a Shot in the dark but thats
all I have at this point
Eddie
"Ken B" <bogus@nowhere.com> wrote in message
news:ZMCCtk3RGHA.592@news-server...
>I seem to think that situation is caused by a bad index. Does the problem
>only happen on the customers system or does it happen on yours as well?
>Can you get a copy of the .dbf and .mdx and append the data into another
>table of identical structure and use it instead of the original and see if
>that helps? Another thing to try is to use the .qbe in a simple form that
>doesn't do anything and see if the problem is still there. If it is still
>there you know you it is not your code but the tables or the BDE setup. If
>it is not there then start adding small amounts of code to the new form
>until it fails. Start with the form_onOpen method if you have one.
>
> HTH,
> Ken
>
>
| |
|
| Pack and Reindex don't always correct problems with an Index file. You
should drop and recreate the indexes to make sure you have good indexes. It
can't hurt and is probably quicker than trying to isolate some code.
Good Luck,
Ken
|
|
|
|
|