Windows Mobile 2003 - Questions and Answers regarding Windows Mobile 2003.
Reply
 
LinkBack Thread Tools
Old 11-15-04, 05:13 PM   #1 (permalink)
CanadianAlien
Aximsite Prospect
 
Join Date: Jun 2004
Posts: 4
iTrader Rating: (0)
Thanks: 0
Thanked 0 Times in 0 Posts
View MyPDA
PIE, ADOCE, HTML & Javascript
PIE, ADOCE, HTML & Javascript
I started messing with two programs made by the same person, called DBFormGen and DBConsole (can be downloaded from many ppc software sites). I like what they do. DBConsole creates a cdb and DBFormGen used this database to create a form and an HTML page that uses javascript to interact with the cdb database. This is great for me because I don't program in eVB, C+, etc but I do understand HTML, and can edit javascript and SQL statements.

However, the javascript in the HTML that the DBFormGen creates gave scripting errors (note: you won't see errors unless you use PIE Tool to set javascript error message on). The error was on a line of javascript that referred to a new ActiveXObject. See code snippet below:

function RunQuery(QueryString) {
var rs;
var DataSource = '\\NewTest.cdb';
rs = new ActiveXObject('ADOCE.Recordset.3.1');
rs.Open(QueryString, DataSource);
return (rs);
}

Ok, time to start learning. After hours of searching and reading MS Knowledge Base articles and newsgroup posts I've determined the following:

1. I thought maybe it had something to do with ADOCE 3.0/3.1 and was missing some dll file or simply had to change some option or edit a registry setting. CE 2003 comes with ADOCE 3.1 so I got ADOCE 3.0 and installed it. Didn't make things work although it could be part of resolution because DBFormGen HTML javascript refers to ADOCE.3.0 and since I had only ADOCE.3.1 it wouldn't have worked. So, more to learn.

2. Then learned that beginning with Windows CE 2002, MS restricted ActiveX from running on PIE. Unlike IE for desktop systems where ActiveX can be installed and used on the fly, on Windows CE 2002/3 devices only ActiveX objects currently on the device can run. This was done for security reasons. After a lot of digging, it appears that the decision to restrict ActiveX on PIE was made suddenly, apparently critical in terms of security, with little forewarning. Consequently, there is very little documentation at MS or elsewhere. Bottomline for my proble is it appears that when the javascript is trying to create an ActiveX Object (ie, ADOCE.Recordset.3.0) it is not allowed to because PIE says it cannot.

3. Many MS KB articles, posts and MVPs said that "you need to implement IObjectSafety" for that ActiveX Object. Great, but what is that and how does it work? Seems anyone who posts solutions for this issue addresses only a developer audience. As far as I can tell, "implementing IObjectSafety" means that you need to declare your ActiveX Object in the Head section of your HTML and/or you have to create your own dll file so that the Object declaration in HTML has something to "point" to.

I just need to understand if I need to make my own dll file or simply make proper references to an existing dll in my HTML and javascript. I also need to know how to incorporate the Object declaration in the HTML Head section in javascript.

I just want to alter DBFormGen results so it works. This really only concerns creating the ActiveX Object ADOCE.Recordset.3.0 (or 3.1) so that I can open a cdb database, read tables or queries, and add and delete records using HTML and javascript in Pocket IE.

I can find no simple examples, sample code, etc. Is there anyone out there willing to lay this out simply for someone who, although not a developer, can follow along?

Thanks in advance!

Dell Axim X30 mid
Pocket PC 2003
CanadianAlien is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links

Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 07:54 AM.

Mobilitysite - Hard Reset Guide - Got Zune? - Tilt Site

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC5
Copyright © 2003-08 LeckMedia, LLC