My First App - Compile & Run on Device

xeir

Member
Licensed User
I have a simple question.

I'm sure I just missed something here, but, just in case.

I went through the 'My First App' section, created the demo app, it worked great as to be expected.

I compiled it and copied it over to the device, and it does not run.
I then used SetupBuilder and created a CAB file, same result.

I'm sure that I missed something extremely simple and just haven't seen the answer on the forums, probably just blind today, or my search skills are lacking, grin.

What am I missing?

I admit, I'm just getting started, but I am eagerly looking forward to replacing what I had previously done in HanDBase with a much more versatile version using Basic4PPC. (Yes, I deal mostly with databases of some type.)

I just like going through things step by step, mostly to torture myself, so that I know how everything works down the line.

Regards
 

specci48

Well-Known Member
Licensed User
Longtime User
Hello xeir,

welcome to the basic4ppc forum!

... I compiled it and copied it over to the device, and it does not run. ...
Can you please be more precise explaining what you did and what exactly happens?
Have you compiled for the desktop, or for the device or smartphone? Which compile options did you use?
What happens if you try to start your .exe on the device? Do you get any error message or just happens nothing?

Maybe you can upload your .exe so we can have a close look on it.


specci48
 

xeir

Member
Licensed User
A second question along the same lines.

I modified the SQL Example to use my own SQLite db for testing purposes and compiled it.

The compilation merged possible files into it, minus one which it says should be distributed with the executable: SQLNative\Device\Syatem.Data.SQLite.dll

Basically what it comes down to is knowing what I need to compile and how to implement and include any necessary file along with the app so that it is functional.

I believe that the conversion of my project from HanDBase to Basic4PPC should be fairly easy, here's hoping, as the PPC side of it ONLY dealt with viewing a db, or in HDB's case multiple flat files, and making changes to one file that was then re-imported back into the main DB, mySQL at this time.

With the versatility of Revolution, which I use as my main programming environment, and Basic4PPC, I can convert my entire project to SQLite, and use Basic4PPC to manage a smaller SQLite db based off the main db for the handheld which will later be imported back into the whole.

Also, unless I'm wrong from what I've already gathered on the forums, it should be possible to:
- Have the main app installed and working (always nice, grin)
- the app can save the info locally to where the sqlite db is for access, typically a storage card, without constantly asking the user where the db is
- have the db on a storage card which is updated as required
- then either have the user copy the file back to there system (mac/pc) or possibly an activesync setup (pc)

Hmm, didn't really mean to go that far in depth, honestly.

But, I'm sure that someone has done something similar, so I thought I'd ask up front.

Best regards!
 

xeir

Member
Licensed User
Thanks for the welcome !!

I did compile the app for the device, I'm using an iPaq 3115, and copied it onto a storage card, tried to run from there, nothing, it doesn't do anything.

So, I thought maybe it was required to do the cab packaging, wouldn't think so. It places the app in the programs dir, yet it still does not run, no response to clicking on it.

I can post the exe and sbp if so required, it's nothing more then the example from 'My First App'. Granted I'm trying with the SQL example now as well.

Ok, just tried the SQL example, and same response, none.

The device, in case there's a hardware issue, is an iPAQ rx3115, running Windows Mobile 2003 SE ver 4.21.1088, 300Mhz ARM architecture.

Just for clarification, both apps, wether compiled for the desktop or for the device, run in windows without a hitch.

It's always fun learning new things, grin!

Regards.

Hello xeir,

welcome to the basic4ppc forum!

Can you please be more precise explaining what you did and what exactly happens?
Have you compiled for the desktop, or for the device or smartphone? Which compile options did you use?
What happens if you try to start your .exe on the device? Do you get any error message or just happens nothing?

Maybe you can upload your .exe so we can have a close look on it.
specci48
 

Zenerdiode

Active Member
Licensed User
Have you ensured the Compact Framework has actually been delivered to the device? You may check with ActiveSync; have your Device connected and do a 'Tools>Add/Remove Programs' in ActiveSync and it should show 'Microsoft .Net CF 2.0'

-or-

On you device, Start>Settings, 'System' tab and 'Remove Programs'. You should see 'Microsoft .NET CF 2.0' in the list.
 

xeir

Member
Licensed User
Ahh hah !! I knew it would be worth asking.

Now .. Here's the scenario, I develop on OS X, which doesn't play nice with ActiveSync, for obvious reasons.

Is there a method to get the .NET CF framework over to the handheld manually? Copy it to a storage card, etc.?

I ask because I tend to sandbox my VMWare setup running Windows.

Now granted, is that going to cause a problem with a released app or can the cab installer be used to install the framework as well? I ask, because as mentioned the main software is being released multi-platform, activesync for windows is fine, but getting the same results for a mac/linux user, where they probably will not have activesync.

See, I knew that sometimes it's the simple things that cause the most problems.

I appreciate the time you're taking in answering these questions. I hope they help others that may be in a similar situation.

I KNEW it was something simple, grin! Much thanks!

EDIT: I found the link to the framework for manually updating the handheld, and it worked fine for the app I had made into a cab and installed. The other one which was just residing on a storage card just hung when trying to run, so I'm going to try make a cab of it and try it again.

EDIT2: Trying the SQL demo compiled on the device, it says it's missing the system.data.sqlite file. I'll recheck the forums, but if you have an inkling I certainly wouldn't mind.
 
Last edited:

BjornF

Active Member
Licensed User
Longtime User
Dear Xeir,

have you checked that it is the right "System.Data.SQLite.dll" that you have? There are two files with the same name - one for the device and one for the desktop, the correct one (from the device folder) should be put in the same folder as the executable file.

(I'm asking because I have made that mistake myself...)

all the best / Björn
 

xeir

Member
Licensed User
BjornF -

"System.Data.SQLite.dll" was not copied over to the device although I do believe I have the correct one on the PC (VMWare) for the handheld. Is there a way to verify? Version, etc.?

Also, I guess I would need a way to manually install the file onto the device, as the package will be used by people with Mac/Linux as well.

I did try copying it over via storage card, but the file is hidden on the device so I can't put it into the app directory.

Getting there one step at a time, grin.

EDIT: Hmm, I'll add the file via setupbuilder and see if that does it.
 
Last edited:

xeir

Member
Licensed User
Yup, got it ..

So to sum it all up:

1. Had to download and install the .NET CF to the device.
2. "System.Data.SQLite.dll" WAS the wrong version which causes the device to pretty much hang.
3. Added the correct, smaller file size, "System.Data.SQLite.dll" to SetupBuilder.
4. Copied the CAB via storage card.
5. Installed via CAB and viola!

Thanks for the insight all the way around. Now that I've seen it in action, I can focus on the conversion, grin.

Regards!
 
Top