Skip to content

Commit 9f83561

Browse files
committed
fix: enable foreign key drop down on grid field in MS SQL mode
Refs #2567
1 parent b09823e commit 9f83561

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

source/dbconnection.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5344,12 +5344,14 @@ function TDBConnection.FindObject(DB, Obj: String): TDBObject;
53445344
var
53455345
Objects: TDBObjectList;
53465346
o: TDBObject;
5347+
fqname: String;
53475348
begin
53485349
// Find TDBObject by db and table string
53495350
Objects := GetDBObjects(DB);
53505351
Result := nil;
53515352
for o in Objects do begin
5352-
if o.Name = Obj then begin
5353+
fqname := o.Schema + '.' + o.Name; // includes "dbo." schema
5354+
if (o.Name = Obj) or (fqname = Obj) then begin
53535355
Result := o;
53545356
Break;
53555357
end;

0 commit comments

Comments
 (0)