PCA >dbwrite still not working!!

Discuss OrbForms Designer and PocketC Architect

Postby RWB on Mon Oct 23, 2006 1:11 pm

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
RWB
RWB
 
Posts: 28
Joined: Fri Feb 10, 2006 12:43 pm
Location: Sweden

Postby jaferzon on Wed Oct 25, 2006 7:37 pm

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.
jaferzon
 
Posts: 4
Joined: Sat Sep 09, 2006 8:20 pm
Location: USA

Postby dewey on Sat Oct 28, 2006 1:31 am

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).
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby RWB on Thu Nov 16, 2006 1:12 am

<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
RWB
RWB
 
Posts: 28
Joined: Fri Feb 10, 2006 12:43 pm
Location: Sweden

Postby RWB on Thu Nov 16, 2006 1:14 am

8)Thanks Dewey.Now it works great.

Best regards
8) Robban 8)

RWB
RWB
RWB
 
Posts: 28
Joined: Fri Feb 10, 2006 12:43 pm
Location: Sweden


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 5 guests

cron