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 - Databases??

Databases??

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Warus on Wed Sep 12, 2001 10:59 am

How can I create Databases??
There's a short manual on orbworks.com but I don't understand it. I never createt a Database, so can anyone tell me a URL to a Website wher's a tutorial or explain it to me in this forum?

If it's possible, write it in German
Warus
 
Posts: 1
Joined: Wed Sep 12, 2001 10:52 am

Postby Sam Gamgee on Wed Sep 12, 2001 1:30 pm

In German (thanks to dictionary.com :)):

um eine Datenbank am Ablauf zu erstellen, verwenden Sie die dbcreate()funktion. Ist hier ein Beispiel, das creats eine Datenbank ' FirstDb ' nannten und schreiben ' hallo Welt!', zu ihm:

<pre id=code><font face=courier size=2 id=code>
main()
{
dbcreat("FirstDb");
dbwrite("hallo Welt!");
dbclose();
}
</font id=code></pre id=code>

Wenn Sie eine Datenbank auf Ihrem PC bilden m?ɬ?chten, dann ?ɬºberpr?ɬºfen Sie aus http://www.individeo.net.

--------
Now in English:

To create a database at runtime, use the dbcreate() function. Here's an example that creates a database called 'FirstDb' and writes 'Hello World!' to it:

<pre id=code><font face=courier size=2 id=code>
main()
{
dbcreat("FirstDb");
dbwrite("Hello World!");
dbclose();
}
</font id=code></pre id=code>

If you want to make a database on your PC, then check out http://www.individeo.net .

Hope this helps.

-Sam.


http://www.frontiernet.net/~wkrawec/games/index.html
Sam Gamgee
 
Posts: 70
Joined: Sun Jul 15, 2001 10:33 pm
Location: USA

Postby SyPDA on Wed Sep 12, 2001 1:55 pm

Uh, oh...

---
In English (thanks to my english teacher) :-)

First of all, there is a mistake in the listing. It should say dbcreat<b>e</b>("FirstDB");
Second, there is no help in retrieving the just stored information. Use the above listing to save one string value and the following code to retrieve it.

---
In German (thanks to my mum) :-)

Zun?ɬ§chst einmal befindet sich ein Fehler im Listing. Es sollte dbcreat<b>e</b>("FirstDB");
hei?É??en. Desweiteren gibt es keine Information, wie man die Daten wieder einliest. Nutze den oben aufgef?ɬºhrten Code um einen String zu speichern und das folgende Listing, um ihn wieder einzulesen.

<pre id=code><font face=courier size=2 id=code>
dbopen("FirstDB");
puts(dbread('s'));
dbclose();
</font id=code></pre id=code>





Edited by - SyPDA on 09/12/2001 08:57:21

Edited by - SyPDA on 09/12/2001 08:59:22
SyPDA
 
Posts: 94
Joined: Tue Dec 05, 2000 8:08 am
Location: Germany

Postby degv on Thu Sep 13, 2001 2:50 pm

The following code is a further (slightly more advanced) db program. Here we are storing integers in a db. We are then reading these back.

I hope it helps. I am just getting to grips with databases myself.

//read db2
int i;
main(){
dbcreate("first db");
i=0;
clear();
while(i<6){
dbrec(i);
dbwrite(i*i);
i++;
}
i=0;
while(i<6){
dbrec(i);
puts(dbread("i")+"\n");
i++;
}
dbclose();
waitp();
}
degv
 
Posts: 47
Joined: Tue Jul 31, 2001 3:26 pm
Location: United Kingdom

Postby palmosm130 on Sat Jun 04, 2005 2:48 pm

i was hoping to find a way to list all the databases while having an interface similar to how PocketsC would list our compiled programs. The book doesn't seem to have that command available.
Kirk P Lawrence
palmosm130
 
Posts: 19
Joined: Fri May 27, 2005 1:51 am
Location: Canada

Postby dewey on Tue Jun 07, 2005 2:06 am

You can find all databases by using dbenum(). Displaying them is up to you - CControls is a good GUI library to start with.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron