[Jslib] SQL XPCOM Methods

Gordan Bobic gordan at bobich.net
Wed Mar 30 16:47:14 EST 2005


Pete Collins wrote:
> 
>>
>>
>>> js> for (var list in Components.classes)
>>>      if (/sql/i.test(list))
>>>        print(list);
>>
>>
>>
>> That comes up empty. :-(
>>
> 
> Looks like there is no factory available ...
> 
> You should have seen
> 
>  @mozilla.org/sql/service;1
> 
> Also, you need to use jslibGetService
> 
> var obj = jslibGetService("@mozilla.org/sql/service;1", "mozISqlService");
> 
> But I doubt that will work if there is no factory available ...

Indeed, you are right. I tried that, and it didn't work.

So, the question is - how to I get a factory for this? Where would this 
normally live, and what would need to be implementing it? Is it likely 
to be a misinstallation, a bug, or something else entirely?

Gordan


More information about the Jslib mailing list