Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Pocket Toolbox and HanDBase 3
Page 1 of 1

PostPosted: Fri Mar 14, 2003 9:54 pm
by mgreen
I have several databases in HanDBase 3 that I'm trying to manipulate with Pocket C and PToolboxLib 7.5.3. DBInfo(1,0) returns 4 for a field count even though there are 20 fields that are used. DBgetrec changes the first [0] field value as successive records are read, but doesn't seem to change the next two fields [1], [2]. I haven't checked other fields. I'm familiar with the API for HanDBase 3 and there is not a field count explicitly available. It can be computed by counting used fields. Is that what's done here? Is there something I'm doing that could account for the error around DBgetrec? I'm initializing an adequately sized string array to empty strings. Any help would be appreciated.
Mike Green


-----
Michael Green

PostPosted: Sat Mar 15, 2003 12:25 am
by jstadolnik
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
I have several databases in HanDBase 3 that I'm trying to manipulate with Pocket C and PToolboxLib 7.5.3. DBInfo(1,0) returns 4 for a field count even though there are 20 fields that are used.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Currently, the "number of fields" reported by DBinfo(1,0) for HanDBase databases is the number of consecutive non-"none" type fields starting at field 0. If you have fields 0 through 3 as a non-none types, and field 4 is a none type, then should expect a "number of fields" value of 4 to be returned, even if you have more valid fields beyond 4.

The library does not use this "number of fields" value. The DBsetrec, DBgetrec always use the HAPI_MAX_FIELDS macro to ensure that all possible fields are accessed.

On the next release, I'll make DBinfo(1,0) return the "position of the last valid field" instead of the "first invalid field". This I think will be more useful.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
DBgetrec changes the first [0] field value as successive records are read, but doesn't seem to change the next two fields [1], [2]. I haven't checked other fields.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

I did some testing and I could not replicate the behavior you describe.

The only possible causes I'm aware of is that fields of type "none" will not be updated in the array (so if the last 95 fields are unused, your pocketC array only needs to be 5 deep). Also, if a record doesn't exist and you try to read from it, the array will not be updated. You can check the return value of DBgetrec() to validate if the read actually worked.

If you are still having problems could you furnish a test case? My email is jstadolnik@hotmail.com.

Thanks,

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm

PostPosted: Sun Mar 16, 2003 1:36 am
by mgreen
Thanks for the information. I rewrote part of the program using DBgetfield. I'll keep an eye out for DBgetrec behavior. I did find that trying to use DBgetfield on an unused record field causes an error (alert) in HanDBase because of a NULL string. If you do revise this section, please add a check for that so PToolboxLib can return a more useful error code.

-----
Michael Green

PostPosted: Mon Mar 17, 2003 1:17 pm
by jstadolnik
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
I did find that trying to use DBgetfield on an unused record field causes an error (alert) in HanDBase because of a NULL string. If you do revise this section, please add a check for that so PToolboxLib can return a more useful error code.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Thanks. I fixed this, now a empty string will be returned for unused fields. The patch will be in the next release.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm