SQL queries in .NET; table name prefix not added -
01-19-2010
, 04:26 AM
When I create SQL queries with multiple tables in .NET the datasets that
are generated do have only the column names. The table name is not
included. That makes it very hard to find the right column. In
PowerBuilder the datawindows are created with a name as <table
name>_<column name>.
For example. I do have two tables. Both tables do have a column ID and Name.
*Employee*
ID,
Name
etc.
Dep_id
etc.
*Department*
ID,
Name,
etc.
With this SQL statement:
SELECT Employees.ID, Department.ID FROM Employees INNER JOIN Departments
ON Employees.dep_id = Departments.ID ;
PowerBuilder returns:
Employees_Id, Department_ID.
In .NET:
ID, ID1
Is there any (configure) setting to let .NET know to add the table name
to the column names?
Tia
Hans |