External Databases and SQL

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

External Databases and SQL

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by Michael Hill >> Wed, 23 Jun 2004 21:28:18 GMT

Morning All,

Just having a little problem and was wondering if anyone could help or point me in the right direction or an example.

I have a MySQL database which I want to be able to send data to and retrieve data from within a Jade program.

The easy part is done in that I can send the data down to the database but I can't workout how to bring the data back in so I can read it. I believe I have everything set up correctly for the database.

Does anyone have a example of using ExternalDictionary/ExternalCollection/ExternalCollection if that is what I need to get this going.

Cheers

Michael

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

Re: External Databases and SQL

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by Jane McEvers >> Thu, 24 Jun 2004 3:01:56 GMT

Hi Michael,

Here is a small example that may help you:

getSQLCountryCode(pCountryID : Integer) : String;

vars
countryDict : Country_TBy_IDDict; //ExternalDictionary
country : Country_T; //ExternalObject
countryCode : String;

begin
if pCountryID > 0 then
create countryDict;
country := countryDict.getAtKey(pCountryID);
if country <> null then
countryCode := country.code_VC;
endif;
endif;
return countryCode;

epilog
delete countryDict;
end;

Cheers
Jane

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

Re: External Databases and SQL

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by Jane McEvers >> Thu, 24 Jun 2004 3:02:45 GMT

Hi Michael,

Here is a small example that may help you:

getSQLCountryCode(pCountryID : Integer) : String;

vars
countryDict : Country_TBy_IDDict; //ExternalDictionary
country : Country_T; //ExternalObject
countryCode : String;

begin
if pCountryID > 0 then
create countryDict;
country := countryDict.getAtKey(pCountryID);
if country <> null then
countryCode := country.code_VC;
endif;
endif;
return countryCode;

epilog
delete countryDict;
end;

Cheers
Jane

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

Re: External Databases and SQL

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by Jane McEvers >> Thu, 24 Jun 2004 3:03:30 GMT

Hi Michael,

Here is a small example that may help you:

getSQLCountryCode(pCountryID : Integer) : String;

vars
countryDict : Country_TBy_IDDict; //ExternalDictionary
country : Country_T; //ExternalObject
countryCode : String;

begin
if pCountryID > 0 then
create countryDict;
country := countryDict.getAtKey(pCountryID);
if country <> null then
countryCode := country.code_VC;
endif;
endif;
return countryCode;

epilog
delete countryDict;
end;

Cheers
Jane


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 26 guests