Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello i checked out in delphi 11 but i guess delphi 11 is case sensitive ! #255

Open
relativ opened this issue Dec 27, 2021 · 2 comments
Open

Comments

@relativ
Copy link

relativ commented Dec 27, 2021

procedure TPSCompileTimeClass.RegisterProperty(const PropertyName,
  PropertyType: tbtString; PropAC: TPSPropType);
var
  FType: TPSType;
  Param: TPSParameterDecl;
  p: TPSDelphiClassItemProperty;
  PT: tbtString;
begin
  pt := PropertyType;
  p := TPSDelphiClassItemProperty.Create(Self);
  p.AccessType := PropAC;
  p.ReadProcNo := InvalidVal;
  p.WriteProcNo := InvalidVal;
  p.OrgName := PropertyName;
  repeat
    FType := FOwner.FindType(FastUpperCase(grfw(pt)));
    if FType = nil then
    begin
      p.Free;
      Exit;
    end;
    if p.Decl.Result = nil  then p.Decl.Result := FType else
    begin
      param := p.Decl.AddParam;
      Param.OrgName := 'param'+IntToStr(p.Decl.ParamCount);
      Param.aType := FType;
    end;
  until pt = '';
  FClassItems.Add(p);
end;

PT: tbtString; is uppercase but bottom of pt code usage all lower case then i do not able work with properties.

my error message is for bottom code like this

 Program IFSTest;
var
	SQLConnection: TDBConnection;
	SQLQuery: TDBQuery;
Begin
	SQLConnection:= TDBConnection.Create();
	SQLConnection.ProviderName := 'MySQL'; // Access, Advantage, ASE, DB2, DBF, InterBase, MySQL, NexusDB, ODBC, Oracle, PostgreSQL, SQL Server, SQLite, MongoDB
	SQLConnection.UserName := 'root';
	SQLConnection.Password := '';
	SQLConnection.Server := 'localhost';
	SQLConnection.Database := 'mysql';
	SQLConnection.Open();
	
	SQLQuery:= TDBQuery.Create();
	SQLQuery.Connection := SQLConnection;
	SQLQuery.SQL.Text := 'select * from user';
	SQLQuery.Open;
	while not SQLQuery.Eof do
	begin
                                Memo1.Lines.Add(SQLQuery.FieldByNameAsString('User')) ;
		SQLQuery.Next;
	end;
	
	SQLQuery.Close();
	SQLQuery.Free();
	
	SQLConnection.Close();
	SQLConnection.free();
	
End.

Failed when compiling

[Error] (7:16): Unknown identifier 'PROVIDERNAME'

because of case sensitive does not work . how to change case sensitive to insensitive in delphi do you know compiler directives?

thanks

@Dingo64
Copy link

Dingo64 commented Jan 31, 2022

It's not case sensitive. Your SQLConnection object does not have ProviderName property.

@relativ
Copy link
Author

relativ commented Feb 4, 2022

No have. it's works on delphi 10.2.3 but does not work on 11

@relativ relativ closed this as completed Feb 10, 2022
@relativ relativ reopened this Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants