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 - Problem accessing Palm Address DB

Problem accessing Palm Address DB

Discuss OrbForms Designer and PocketC Architect

Postby jcmax on Tue Sep 27, 2005 1:23 pm

I'm attempting to access the Address Entries in the Palm Address Database on a Palm Pilot M105

I'm actually able to access

The problem I'm having is: If the Firstname, Lastname, or Company name fields are blank, the data retrieve is incorrect

For example, I created a single Entry in the Palm Address List with a Company name of "ABC Test Co", a firstname of "Joe", a lastname of "Test", and a phone number of "716-555-1234"

If the record is left as is (with Company, Firstname, Lastname, and Phone fields populated), the record is retrieved correctly

For example:

Company = ABC Test Co
Firstname = Joe
Lastname = Test
phone1 = 716-555-1234


But if I take away (remove) Company name from the record I the phone number when I retrieve the Company name and a Note when I retrieve the Phone1 field.

Such as:

Company = 716-555-1234
Firstname = Joe
Lastname = Test
phone1 = To find accessories and
useful add-on software, please
visit our web site at http://www.palm.com

And if I put back the Company name and take away the first name I get the phone number when I retrieve the Company name and the Company name when I retrieve the Firstname

Such as:

Company = 716-555-1234
Firstname = ABC Test Co
Lastname = Test
phone1 = To find accessories and
useful add-on software, please
visit our web site at http://www.palm.com

Something is completely wacked!


Here's what my code looks like:
-- ----------------------------

// mainform.oc
// Created for mainForm


struct AddressEntry
{
int options, bitmask;
char reserved;
string LastName,FirstName,Company,Phone1,Phone2,Phone3,Phone4,
Phone5,Address,City,State,ZipCode,Country,Title,Custom1,Custom2,
Custom3,Custom4,Note,NumFields;
};


Database db;
AddressEntry entry;
DBRecord rec;
int i;
int cnt = 0;


void getRecord()
{

db.getrec(cnt , rec, true);

rec.read(&entry, typeof(AddressEntry), 1);

field1002.text = "Company = "+entry.Company+"\n\n"+
"Firstname = "+entry.FirstName+"\n\n"+
"Lastname = "+entry.LastName+"\n\n"+
"phone1 = "+entry.Phone1;

rec.close();
}


handler mainForm.onopen()
{
db.open("AddressDB", true);
getRecord();
}
jcmax
 
Posts: 4
Joined: Tue Sep 27, 2005 1:17 pm

Postby nmc on Tue Sep 27, 2005 7:00 pm

Take a look into ObrForms/utilcode/address.oc for a way to read out the data correctly ;-)
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby jcmax on Thu Sep 29, 2005 9:58 pm

That doesn't seem to work either
I created a new project and added the "address.oc" source to file
Now when I try to retrieve data (such as the Company name) I get nothing at all

Here?¢‚Ǩ‚Ñ¢s what my code looks like:
--------------------------------------

// mainform.oc
// Created for mainForm

Address myAddress;
AddressDB myAddressDB;

handler mainForm.onopen() {
// TODO: handle onopen event

myAddressDB.open();
myAddressDB.read(1, myAddress);
field1002.text = myAddress.company;

}
jcmax
 
Posts: 4
Joined: Tue Sep 27, 2005 1:17 pm

Postby dewey on Sat Oct 01, 2005 3:46 am

Make sure that the read method succeeded, since address "1" may not be readable if it is hidden or deleted.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest