Skip to content

Commit cbdc78d

Browse files
committed
fix: enable foreign key drop down on grid field in MS SQL mode
Refs #2567
1 parent 57905b0 commit cbdc78d

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
@@ -5514,12 +5514,14 @@ function TDBConnection.FindObject(DB, Obj: String): TDBObject;
55145514
var
55155515
Objects: TDBObjectList;
55165516
o: TDBObject;
5517+
fqname: String;
55175518
begin
55185519
// Find TDBObject by db and table string
55195520
Objects := GetDBObjects(DB);
55205521
Result := nil;
55215522
for o in Objects do begin
5522-
if o.Name = Obj then begin
5523+
fqname := o.Schema + '.' + o.Name; // includes "dbo." schema
5524+
if (o.Name = Obj) or (fqname = Obj) then begin
55235525
Result := o;
55245526
Break;
55255527
end;

0 commit comments

Comments
 (0)