Ver Mensaje Individual
  #1  
Antiguo 15-12-2010
nato2005 nato2005 is offline
Registrado
NULL
 
Registrado: dic 2010
Posts: 1
Reputación: 0
nato2005 Va por buen camino
Thumbs up Problema con TSQLQuery y BPL.

Hola a todos.

Tengo un problema al utilizar bpl y cargarlos en tiempo de ejecución. Mi problema consiste al momento de crear dentro del bpl un TSQLQuery, por ejemplo:

Dentro del BPL tengo el siguiente código:

procedure Prueba;
var
Q:TSQLQuery;
begin
Q:=TSQLQuery.Create(nil);
try

finally
FreeAndNil(Q);
end;
end;

Exports
Prueba;


Lo compilo como RunTime Only, y lo cargo en mi aplicación principal con el siguiente código:

var
phm: HModule;
LaPrueba: procedure;
begin
phm:=LoadPackage(ExtractFilePath(ParamStr(0)) + 'Prueba.bpl');
if phm <> 0 then
try
@LaPrueba:=GetProcAddress(phm,'Prueba');
if Assigned(LaPrueba) then
LaPrueba
else
ShowMessage('No se encontró el procedimiento Prueba');
finally
UnloadPackage(phm);
end
else
ShowMessage ('No se encontró Prueba.bpl');
end;


El problema ocurre en la línea del BPL Q:=TSQLQuery.Create(nil); pues me muestra la siguiente excepcion "Application is not licensed to use this feature", y he comprobado que solamente ocurre al utilizar objetos que heredan del TDataSet. La licencia que estoy utilizando es Arquitect. ¿Alguna sugerencia para solucionar el problema?
Responder Con Cita