Page 1 of 1

PostPosted: Sun Jan 09, 2005 10:41 pm
by r2k
"Run68K.c, Line:3109, Odd aligned read from 90CE0F01"

what means that error i was trying to write records in a pilot-db i wrote all fields putting their cotent in a array created by Array i'm sure that it's the correct numbers of fields and when i write on DB sometimes writes 3 fields per record when my DB has only 2 fields when i acces to DB util in the palm the record show in this way

field 1: content_field1
field 2: content_field2
: Unsupported field type

PostPosted: Sun Jan 09, 2005 10:50 pm
by r2k
now i will append some of my method code here to show whats happening in my code.
Code: Select all
int autoIncrement(int table){
   pointer result;
   int counter=0,value=0,state=0;
   int limit=0;
   string name;

   name=nombreBD(9); <--- this function gives me the BD name

      else result[1]=value;

sorry if some is misstranslated i was in a rush when i was translating this

PostPosted: Sun Jan 09, 2005 10:52 pm
by r2k
one note i have other method doing something similar and i don't have any problem with that. allways writes well :)

PostPosted: Sun Jan 09, 2005 10:56 pm
by r2k
Code: Select all
DBsetrec((counter-1),result); <-- in this line the error ocurrs

sometime the palm sim shows me that fatal alert and sometime writes 3 fields per record

PostPosted: Mon Jan 10, 2005 12:31 am
by jstadolnik
Make sure you're using v7.6.2beta. Available here:


The PToolboxLib guy.

PostPosted: Mon Jan 10, 2005 7:24 pm
by r2k
in fact since you posted the URL in the past topic i downloaded the beta 9 and installed in my pda.

actually i'm using :

PocketC 6.60
Ptoolbox 7.6.2beta9

PostPosted: Mon Jan 10, 2005 8:10 pm
by jstadolnik
Did you create the database originally with 3 fields?

Make sure that the database only has 2 fields to begin with (as created with DBcreate). Do a DBinfo(1,0) to check the field count before you do your "for" loop to ensure this.

If you do a DBsetrec on a database with 3 fields using an array with only has 2 elements, there's no telling what will happen as you'll be reading off the end of the array. This could cause the error you're seeing.


The PToolboxLib guy.

PostPosted: Mon Jan 10, 2005 9:10 pm
by r2k
thank you, you was right. In some point i created the database with 3 fields. i put DBcreate with 3 fields and all of my arrays had 2 fields, because that i was receiving the error. thanks.