DBsetrec()/Emulator question

A PocketC native palm library offering native forms and assorted utilities

Postby Mikael on Sun Apr 10, 2005 3:36 am

When running my app on the Emulator, I keep getting a 'SysFatalAlert...Record isn't busy' alert every time I access a function which uses DBsetrec(). It allows me to continue, and the function works fine, both on the Emulator, Simulator and hardware, but I just can't work out what it means. Is this an emulator bug or some conflict with PToolbox or is it something I should take seriously?

Thanks in advance,

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Sun Apr 10, 2005 3:08 pm

Are you working with Pilot-DB or HandBase databases?

If

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Sun Apr 10, 2005 4:20 pm

Sorry, I forgot to mention that. I'm working with PilotDB.

I'm working on the theory that it could be an oversight on my part with regard to the indexing of the array I'm using for the setrec function, as I'm using setrec in two related functions which write to two adjacent fields and two functions which read what has been written. At read time one works, while the other one doesn't. I've made a couple of changes to the code, but I've been ill over the weekend and it's turned into spaghetti, as I can't think straight - nothing new there I suppose :mrgreen:. As soon as I become a bit more clear-headed I'll be able to better see where I'm going wrong.

Thanks

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby Mikael on Sun Apr 10, 2005 6:35 pm

I've just double-checked to make sure, and straightened out the mess with the indexing. As mentioned before it works fine on hardware and the Simulator - at least when the Simulator feels like working - so I think it has to be DBsetrec() that's to blame. The important bits in the two functions using it are follows:

SaveCurrentPositionDC(){
//more things here

DBopen("OtherStuff");
savedPos=Array("s,7");
DBgetrec(gotoRec, savedPos);

savedPos[5]=(string)startPosI;
alert("Here 1");
DBsetrec(gotoRec,savedPos);
alert("Here 2");

Fctl(FREE,9447);
ClearBuf();
comingFromSaved=true;
free(savedPos);
free(singleSavedPos);
DisChars();
break;
}}}

SaveCurrentPositionVC(){
//more things here
DBopen("OtherStuff");
savedPos=Array("s,7");
DBgetrec(gotoRec, savedPos);

savedPos[6]=(string)startPosI;
alert("Here 1");
DBsetrec(gotoRec,savedPos);
alert("Here 2");

Fctl(FREE,9447);
ClearBuf();
comingFromSaved=true;
free(savedPos);
free(singleSavedPos);
ViewChars();
break;
}}}

The Emulator barks when it reaches the point between the two alerts in both cases, before letting me continue.

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Sun Apr 10, 2005 10:39 pm

Email me and I'll send you something to try (jstadolnik@hotmail.com).

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA


Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 0 guests

cron