Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Accessing SQLite under Windows CE Professional

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho
to Arí Ricardo Ody

2009/11/19 "Ar? Ricardo Ody"

Well, how can I inform the full path to the ".db" file and in what directory of the handheld I must put the sqlite3.* files in the way lazarus executable find them?

For the .db file you need to pass the full path. If you want to use the directory where the executable is you can use something like:

MyDatabaseFilePath := ExtractFilePath(Application.EXEName) + 'mydatabase.db';

For the .dll files, you can put in \Windows

I tried to put them in the same directory of the handheld where the executable is and it seems that there were errors because after appears the logo of the windows ce when it is loading a program nothing happens.

There is a problem in error showing ... I hope to fix it in the next days.

Felipe Monteiro de Carvalho

Reply by email

waldo kitty
to Arí Ricardo Ody: -------------- next part -------------- An HTML attachment was scrubbed... URL:…

can you not use "./foo" where "./" is the important part? must a directory be listed? it would seem that it should look where it is started from (ie: the current directory) before looking elsewhere??

Ar? Ricardo Ody wrote 41 lines
I've configured a single project in Lazarus to access a SQLite database with DBNavigator and DBGrid. The grid is filled with the database data. I must inform de database file with its full path to ".db" file. I must put sqlite3.* libraries in a directory that appears in the path. Well, how can I inform the full path to the ".db" file and in what directory of the handheld I must put the sqlite3.* files in the way lazarus executable find them? I tried to put them in the same directory of the handheld where the executable is and it seems that there were errors because after appears the logo of the windows ce when it is loading a program nothing happens. Or... How can I do the program runs successfully in the handheld? I'm using an emulator of the windows mobile 6 professional under windows vista. A single program that show a "hello world" message runs ok. Greetings from Sao Paulo - Brazil Ricardo ------------------------------------------------------------------------ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

waldo kitty
to Felipe Monteiro de Carvalho: 2009/11/19 "Ar? Ricardo Ody" For the .db file you need to pass the full path. If you want…
Felipe Monteiro de Carvalho wrote 9 lines
2009/11/19 "Ar? Ricardo Ody" > Well, how can I inform the full path to the ".db" file and in what directory of the handheld I must put the sqlite3.* files in the way lazarus executable find them? For the .db file you need to pass the full path. If you want to use the directory where the executable is you can use something like: MyDatabaseFilePath := ExtractFilePath(Application.EXEName) + 'mydatabase.db'; For the .dll files, you can put in \Windows

ugh!! i thought this old problem was taken care to remove pollution from windows OS directories :( is there not a better place to put them??? :?

Show quoted text 13 lines
> I tried to put them in the same directory of the handheld where the executable is and it seems that there were errors because after appears the logo of the windows ce when it is loading a program nothing happens. There is a problem in error showing ... I hope to fix it in the next days. -- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Felipe Monteiro de Carvalho
to waldo kitty: can you not use "./foo" where "./" is the important part? must a directory be listed? it…
waldo kitty wrote
can you not use "./foo" where "./" is the important part?

That might do it for Linux Shell but not really in Windows CE API =)

must a directory be listed?

Yes

it would seem that it should look where it is started from (ie: the current directory) before looking elsewhere??

Windows CE does not have the concept of "current directory"

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho
waldo kitty wrote
can you not use "./foo" where "./" is the important part?

By the way, I doubt that this would work even in Linux APIs, because the shell expands the ./ and other clever stuff like *

When using a API you need to put the full path in Linux too. Windows is about the only one allowing a incomplete path in APIs to point to the "application directory", but not in Windows CE

Felipe Monteiro de Carvalho

Reply by email

waldo kitty
to Felipe Monteiro de Carvalho: That might do it for Linux Shell but not really in Windows CE API =) Yes Windows CE does…
Felipe Monteiro de Carvalho wrote
On Thu, Nov 19, 2009 at 9:27 PM, waldo kitty wrote: > can you not use "./foo" where "./" is the important part? That might do it for Linux Shell but not really in Windows CE API =)

hehehe, oops... reverse the slash then... ".\" ;)

Show quoted text 8 lines
> must a directory be listed? Yes > it would seem that it should look where it is started from (ie: > the current directory) before looking elsewhere?? Windows CE does not have the concept of "current directory"

kinda not really surprising...

Reply by email

waldo kitty
to Felipe Monteiro de Carvalho: By the way, I doubt that this would work even in Linux APIs, because the shell expands…
Felipe Monteiro de Carvalho wrote 5 lines
On Thu, Nov 19, 2009 at 9:27 PM, waldo kitty wrote: > can you not use "./foo" where "./" is the important part? By the way, I doubt that this would work even in Linux APIs, because the shell expands the ./ and other clever stuff like *

is that really a problem? oh wait... you're saying that the shells do this expansion but the API doesn't... hummm...

When using a API you need to put the full path in Linux too. Windows is about the only one allowing a incomplete path in APIs to point to the "application directory", but not in Windows CE

aren't they nice li'l back stabbers? :P :lol:

i'm still waiting on the version of windows that has the best of each, ME, CE and NT... supposedly to be called Windows CEMENT ;)

[yeah, i know... it was a lame joke when it first came out and is still a lame joke all these years later...]

Reply by email