Fórum Qdo declaro [loPartialKey], no comando locate, da erro!! #174255
11/08/2003
0
Qdo declaro [loPartialKey], no comando locate, da erro!!
A rotina é esta:
procedure TGerenciadorCustomer.LabeledEdit9KeyPress(Sender: TObject;
var Key: Char);
Var
LocateSuccess: Boolean;
begin
if Key=Chr(13) then
begin
DataModule1.CustomerTb.Active:=False;
DataModule1.CustomerTb.IndexFieldNames:=´Nome´;
DataModule1.CustomerTb.Active:=True;
With DataModule1.CustomerTb do
begin
DataModule1.CustomerTb.First;
//while not eof do
// begin
//if DataModule1.CustomerTb.FindKey([LabeledEdit9.Text]) then
LocateSuccess:=DataModule1.CustomerTb.Locate(´Nome´,LabeledEdit9.Text,[loPartialKey]);
if LocateSuccess=True then
begin
CustTmp.Insert;
E o D7, retorna um erro, no [loPartialKey], informando que não foi declarado:Undeclared Indentifier:´loPartialKey´.
Como se resolve?
A rotina é esta:
procedure TGerenciadorCustomer.LabeledEdit9KeyPress(Sender: TObject;
var Key: Char);
Var
LocateSuccess: Boolean;
begin
if Key=Chr(13) then
begin
DataModule1.CustomerTb.Active:=False;
DataModule1.CustomerTb.IndexFieldNames:=´Nome´;
DataModule1.CustomerTb.Active:=True;
With DataModule1.CustomerTb do
begin
DataModule1.CustomerTb.First;
//while not eof do
// begin
//if DataModule1.CustomerTb.FindKey([LabeledEdit9.Text]) then
LocateSuccess:=DataModule1.CustomerTb.Locate(´Nome´,LabeledEdit9.Text,[loPartialKey]);
if LocateSuccess=True then
begin
CustTmp.Insert;
E o D7, retorna um erro, no [loPartialKey], informando que não foi declarado:Undeclared Indentifier:´loPartialKey´.
Como se resolve?
Host
Curtir tópico
+ 0
Responder
Posts
11/08/2003
Daaneto
Insira na cláusula uses a unit DB, da seção interface.
Ficará mais ou menos assim:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, [b:ded3316c5c]DB[/b:ded3316c5c];
Ficará mais ou menos assim:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, [b:ded3316c5c]DB[/b:ded3316c5c];
Responder
Gostei + 0
11/08/2003
4_olho
Veja se não está confundindo as letras. i e l maiúsculas são iguais ...
Já aconteceu comigo! Tá certo que sou meio ´ceguinho´! :shock:
Já aconteceu comigo! Tá certo que sou meio ´ceguinho´! :shock:
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)