Page 1 of 1

PostPosted: Mon Oct 23, 2006 1:11 pm
by RWB
Hi friends.I'm trying to convert an app from pocketc, to PocketC Architect and I'm using #include "pc_most.oc" , to be able to use pocketC laungage.
All was working great, until I tried to use dbwrite!

Then I've got an errormessage "undeclared identifier" !

I included #include "pc_database.oc" but get the errormessage "identifier already defined" !

I can't get ,dbwrite to work at all in Pocketc Architect,BUG?



RWB

PostPosted: Wed Oct 25, 2006 7:37 pm
by jaferzon
Try architect db functions instead.
1. U got to open database first.
Ex: Database dbmy;DBRecord dbrmy;
if(dbmy.open("Name_of_database",false) {
2. Create new Record at position integer i
dbmy.newrec(&i,dbrmy);
3.Write to new record either a variable or a structure. For example string mystr.
dbrmy.write(&mystr,"s",1);
4.Close record and database
dbrmy.close(); dbmy.close(); }
Thats one of the solutions.

PostPosted: Sat Oct 28, 2006 1:31 am
by dewey
OrbC does not support functions with an unknown parameter type, such as dbwrite - in fact, PocketC only supported it for built-in functions, not user defined functions. So, the PocketC compatibility layer uses dbwritei(), dbwritef(), dbwritec(), and dbwrites() to write ints, floats, chars, and strings (respectively).

PostPosted: Thu Nov 16, 2006 1:12 am
by RWB
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by dewey</i>
<br />OrbC does not support functions with an unknown parameter type, such as dbwrite - in fact, PocketC only supported it for built-in functions, not user defined functions. So, the PocketC compatibility layer uses dbwritei(), dbwritef(), dbwritec(), and dbwrites() to write ints, floats, chars, and strings (respectively).
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

RWB

PostPosted: Thu Nov 16, 2006 1:14 am
by RWB
8)Thanks Dewey.Now it works great.

Best regards
8) Robban 8)

RWB