Erro na connection do SQLite

11/01/2018

0

Fala galera, blz!?
Estou fazendo um app simples, mas que precisa de um banco de dados no app. Estou tentando colocar o SQLite, mas venho enfrentando muitos problemas.
Continuo recebendo erro na connection:

 "Invalid class typecast" 


Usei o SQLite studio e as tabelas estão todas certinhas! Nos detalhes do erro tem as seguintes mensagens:

[16C46F41]{FireDACSqliteDriver250.bpl} FireDAC.Phys.SQLite.TFDPhysSQLiteConnection.InternalConnect (Line 1362, "FireDAC.Phys.SQLite.pas" + 1) + $1B
[5005A42E]{rtl250.bpl  } System.ErrorAt (Line 5665, "System.pas" + 3) + $4
[5005FBDB]{rtl250.bpl  } System.@AsClass (Line 17416, "System.pas" + 3) + $5
[16C46F41]{FireDACSqliteDriver250.bpl} FireDAC.Phys.SQLite.TFDPhysSQLiteConnection.InternalConnect (Line 1362, "FireDAC.Phys.SQLite.pas" + 1) + $1B
[166DE730]{FireDACCommonDriver250.bpl} FireDAC.Phys.TFDPhysConnection.ConnectBase (Line 3318, "FireDAC.Phys.pas" + 3) + $5
[166DE7E9]{FireDACCommonDriver250.bpl} FireDAC.Phys.TFDPhysConnection.DoConnect (Line 3344, "FireDAC.Phys.pas" + 4) + $3
[166DF339]{FireDACCommonDriver250.bpl} FireDAC.Phys.TFDPhysConnection.Open (Line 3518, "FireDAC.Phys.pas" + 29) + $3
[167CCA1E]{FireDAC250.bpl} FireDAC.Comp.Client.TFDCustomConnection.DoInternalLogin (Line 4004, "FireDAC.Comp.Client.pas" + 2) + $5
[16534C89]{FireDACCommon250.bpl} FireDAC.UI.TFDGUIxLoginDialogImplBase.Execute (Line 630, "FireDAC.UI.pas" + 42) + $3
[5016D5F3]{rtl250.bpl  } System.Classes.TComponent.QueryInterface (Line 16594, "System.Classes.pas" + 3) + $E
[167CCBF3]{FireDAC250.bpl} FireDAC.Comp.Client.TFDCustomConnection.DoLogin (Line 4040, "FireDAC.Comp.Client.pas" + 16) + $E
[167CD6CE]{FireDAC250.bpl} FireDAC.Comp.Client.TFDCustomConnection.DoConnect (Line 4221, "FireDAC.Comp.Client.pas" + 13) + $E
[5118C129]{dbrtl250.bpl} Data.DB.TCustomConnection.SetConnected (Line 3598, "Data.DB.pas" + 9) + $4
[167CD525]{FireDAC250.bpl} FireDAC.Comp.Client.TFDCustomConnection.SetConnected (Line 4190, "FireDAC.Comp.Client.pas" + 4) + $3
[5118C0E4]{dbrtl250.bpl} Data.DB.TCustomConnection.Open (Line 3580, "Data.DB.pas" + 0) + $4
[168886CB]{vclFireDAC250.bpl} FireDAC.VCLUI.ConnEdit.TfrmFDGUIxFormsConnEdit.btnTestClick (Line 820, "FireDAC.VCLUI.ConnEdit.pas" + 8) + $2
[50AB5287]{vcl250.bpl  } Vcl.Controls.TControl.Click (Line 7442, "Vcl.Controls.pas" + 9) + $8
[50ADAF8A]{vcl250.bpl  } Vcl.StdCtrls.TCustomButton.Click (Line 5441, "Vcl.StdCtrls.pas" + 3) + $2
[50ADBA98]{vcl250.bpl  } Vcl.StdCtrls.TCustomButton.CNCommand (Line 5902, "Vcl.StdCtrls.pas" + 1) + $D
[50AB4D1A]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7326, "Vcl.Controls.pas" + 91) + $6...


Como resolver?

Essa dúvida foi gerada a partir de um comentário na aula Criando um BD e Data Module - Curso Desenvolvendo para Android com Delphi - Aula 16
Mário Filho

Mário Filho

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar