accessing a Jade database in Delphi

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm

by ssi >> Sun, 12 May 2002 22:34:07 GMT

Hi,
I am tryng to access a property value in Jade from a Delphi application. I have managed to sign on to the database, but am unsure of how to get a property value on a specific object.
Has anyone done this?

Thanks
Mark

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm

by CarlRanson >> Sun, 12 May 2002 23:29:54 GMT

Jade only provides include files for C & C++ unfortunately. These can be found in the include directory (.h and .hpp files).

I have a partial translation of these to delphi somewhere at home, I'll see if I can dig it out. From memory I got as far as dealing with strings and binaries before I lost interest.

Anyone else done this exercise?

CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm

by allistar >> Mon, 13 May 2002 1:19:03 GMT

On Sun, 12 May 2002 23:29:54 GMT, carl.ranson@unify.co.nz (CarlRanson) wrote:

I have done quite abit of work using the JOMAPI in C++, but not in Delphi. You could always do your Jade communication code in a C++ dll
and call that from within your Delphi application. That shouldn't be
too difficult, depending on how comfortable you are with C++.

Regards,
Allistar. ------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm

by ssi >> Mon, 13 May 2002 4:58:56 GMT

So far I have built a Jade dll in C++ and have managed to access the Jade Initialize and SignOn functions from within Delphi. But I am unsure of how to access a property value. Among the functions provided by the dll is a GetOid function, but it requires a whole lot of parameters such as classID and instanceID and others. So I was thinking you could get the Oid then access the property on the object. Does this sound like the correct way of going about things?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm

by cdshearer >> Mon, 13 May 2002 19:56:51 GMT

Hi Mark

This sounds exactly right to me. After all, a JADE Oid is simply a combination of class number and instance number, so this should be fairly simple.

All of the stuff you can do in JADE you can do from C++ too, it's just a lot more verbose!

Craig

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:38 pm

by CarlRanson >> Mon, 13 May 2002 22:55:07 GMT

You would have to make the same calls to the JOM API as you would in C++

These are documented in a chapter in the ObjectManager book. At the very least you need to make calls to

jomInitialize, jomSignOn, jomSignOff, jomFinalize

And by the sound of things you also need,

jomGetObject, jomGetProperty, jomSendMsg, jomClearBuffers

I havent seen anything about a getOid function in the help, can you give us the details?

Oh, and now that I look at the hpp include files, I see they have some nice wrapper classes for DskParam etc.

check out jomobj.hpp.

CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:38 pm

by CarlRanson >> Tue, 14 May 2002 4:18:20 GMT

Question: have you tried using an ActiveX exposure?

Although it seems intimidating at first, it might be an easier way to achieve what you're trying to do. I was able to get a db opened, updated and closed from javascript in a few hours when I last tried it.

CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:38 pm

by ssi >> Thu, 16 May 2002 1:01:53 GMT

I am current trying to use an ActiveX exposure, and can open the database but just not sure how to access an object.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: accessing a Jade database in Delphi

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:38 pm

by cdshearer >> Thu, 16 May 2002 1:11:25 GMT

Probably the easiest way to do what you do, and especially in C++ would be to simply call a method on app that returns the value you want - and let the Application class method do all the hard work in JADE itself of locating your object and getting the property you want off it.

The hardest part of all this is locating the object you want - you either have to know the Oid, or use a method like firstInstance() to get it, or call a method on one of the environment objects (process, app, schema, global, etc.)

Craig


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 28 guests