Ver Mensaje Individual
  #1  
Antiguo 30-10-2015
Avatar de cl2raul
cl2raul cl2raul is offline
Miembro
 
Registrado: sep 2008
Ubicación: La Habana, Cuba
Posts: 88
Reputación: 16
cl2raul Va por buen camino
Question SQLite FDConnection FDTable error al correr aplicacion

Hola a todos, quiero hacer una apk que funcione tipo catalogo offline mediante una base de datos sqlite3 donde esta tiene imagenes, componentes principales un TImage, 2 Tedit, FDConnection y FDTable...
-En el FDConnection el drivername a sqlite y le doy la ruta al fichero *.db y activo la conexion.
-Conecto el FDTable al FDConnection y selecciono el TableName.
-en el diseñador de LiveBindings conecto:
Edit1 con id
Edit2 con nombre
Image con picture
-id, nombre y picture son Fields de FDTable.
-automaticamente se crean BindSourceDB y BindingsList.
-agrego el componente BindingNavigator y en la propiedad DataSource selecciono BindSourceDB.
-activo la FDTable y se muestra todos los datos en los Edit1, Edit2 e Image.

Supuestamente todo esta bien pero cuando corro el proyecto en mi movil(huawei y300-0100 con adroid 4.2.2) se muestra la pantalla en negro y no hace nada????
aqui les va la unit completa:

Código Delphi [-]
unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Edit,
  FMX.Objects, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error,
  FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool,
  FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Stan.Param, FireDAC.DatS,
  FireDAC.DApt.Intf, FireDAC.DApt, System.Rtti, System.Bindings.Outputs,
  Fmx.Bind.Editors, Data.Bind.EngExt, Fmx.Bind.DBEngExt, Data.Bind.Components,
  Data.Bind.DBScope, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client,
  FMX.Layouts, Fmx.Bind.Navigator;

type
  TForm1 = class(TForm)
    Image1: TImage;
    Edit1: TEdit;
    Edit2: TEdit;
    FDConnection1: TFDConnection;
    FDTable1: TFDTable;
    BindSourceDB1: TBindSourceDB;
    BindingsList1: TBindingsList;
    LinkControlToField1: TLinkControlToField;
    LinkControlToField2: TLinkControlToField;
    LinkPropertyToFieldBitmap: TLinkPropertyToField;
    BindNavigator1: TBindNavigator;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

end.
Responder Con Cita