Creo que el problema está acá:
Código Delphi
[-]
procedure conectarDB; stdcall;
begin
DM:=TDM.create(application);
try
DM.Dconnection.Params.Clear;
DM.Dconnection.Params.Add('Database='+GetCurrentDir+'\cmodelo.db');
DM.Dconnection.Params.Add('DriverID=SQLite');
DM.Dconnection.Connected:=True;
finally
DM.free;
end;
end;