Hello,
I have a view in my Database. In this View, there are Fieldnames like
VP.Title
State.Title
When I do my SQL Query with Uniquery (Select * From myView) the fieldnames will be Title and Title_01 in the fieldlist of UniQuery. The Setting in Options.FieldsOrigin is True. I want to have the original fieldnames. How can i solve this Problem.
Thanks
Wrong Fieldnames with UniQuery
Re: Wrong Fieldnames with UniQuery
Hello,
Please specify the name of the DB you are using.
Please specify the name of the DB you are using.
Re: Wrong Fieldnames with UniQuery
It is a MS Access Database.
I am Changing my Application from ADO to UniDAC. In Ado the fieldnames where the same like in the table.
I am Changing my Application from ADO to UniDAC. In Ado the fieldnames where the same like in the table.
Re: Wrong Fieldnames with UniQuery
We have checked this behavior in ADO. FieldName for identical fields is created with serial number as well. In UniDAC, to retrieve the real field name, you should set the FieldsOrigin option to True, In this case, the real field name can be retrieved with the Origin property:
Code: Select all
var
i: integer;
begin
UniQuery1.Open;
for i:= 0 to UniQuery1.FieldCount - 1 do
ShowMessage(UniQuery1.Fields[i].Origin);
end;Re: Wrong Fieldnames with UniQuery
The field names are different in the original database (Sample: VP.Title and State.Title) and ADO has taken over these fieldnames. The fieldnames results from a view of multiple tables.
It gets complicated when this function no longer works to rewrite the project.
It gets complicated when this function no longer works to rewrite the project.
Re: Wrong Fieldnames with UniQuery
This is a specificity of Access and ADO (an ability to create views with identical fields). You can leave a suggestion to implement this feature at our uservoice page: http://devart.uservoice.com/forums/1046 ... components .