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 - Saving Data

Saving Data

Discuss PocketC for CE (including Desktop Edition)

Postby maurub on Mon Feb 13, 2006 11:40 pm

Hi there:
I am trying to figure out how to save data in a file and retrieve it later on... There is one function which is fileopen(). There are instruction for writting and reading the file...
The problem I got is How can I Read one SPECIFIC data stored in the file? I just...wonder...?????
Anybody can help???
I?Ǭ¥m using PocketC for PocketPC.
Thanks in advance.
Mauricio
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby wolfgang on Sun Feb 19, 2006 9:20 pm

If all your entries have the same length, you can use fileseek() to go to a specific poisition in the file and then read from there. Otherwise you have to go to the beginning of the file (again with fileseek(), or by closing and opening the file) and parse it until you find what you need.

Wolfgang


Composing music on the PocketPC! - http://www.pdamusician.com
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby maurub on Mon Feb 20, 2006 2:52 pm

Thank You Wolfgang...
Somebody told me about database which I think fits better to my needs.
However...just take a look at the following routine and tell me what could be wrong:
#include /PocketC/pcheader.h
int dbid; int numero;
string nombre;
main()
{
showconsole();
numero=70;
dbid = dbcreate(nombre,numero);
putsl (" " + dbid);
putsl (" " + numero);
}

I get on console
0
70
Why...why I can not open a database?
Usung jornada 548 series Pocketpc...
?????
in some of the million attempts..by the way one of the first...I got a number...something like 117856 as a retur from dbcreate... but later...I put showconsole and other things..and then no more number...but 0!
Thanks in advance.
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby wolfgang on Tue Feb 28, 2006 4:11 pm

Since you say it worked the first time, but never after, I would suspect you created the database successfully that first time. After that first run the database already exists, so trying to create another one with the same name will fail. You'll need to delete or rename the existing one first before you create the new one, though more likely you'd just want to keep the existing one and access using dbopen.

In the final program, the flow would be likely something like

- try to create database (dbcreate)
- if that fails, it may already exist, so try to open it (dbopen)
- if that fails, too, issue an error message

Wolfgang


Composing music on the PocketPC! - http://www.pdamusician.com
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby maurub on Sat Mar 11, 2006 12:47 am

Yeah!!!
You are completely right Wolfgang...I was fighting against an invisible enemy...the database was already created!!!
Now...dont you know why I cant use CEVT_LPWSTR from CE library? I can not use any of the property type for WinCE
The message I get is "Undeclared Identifier"
I tried making the following:
palabra = "CEVT_LPWSTR";
and then
record = dbrecwrite(0,palabra,1,(int) 10);
the compiler sends a Build Succesful but...
When I run the program... I get:
Database Error...UNSUPORT DATABASE VALUE TYPE...
Thank you for your help.
Mauricio.
Pd.
I use at the begining of the code:
#include "/PocketC/pcheader.h"
#include "/PocketC/windbase.h"
maurub
 
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 2 guests

cron