Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL queries in .NET; table name prefix not added

8 views
Skip to first unread message

Hans Groeneveld

unread,
Jan 19, 2010, 5:26:13 AM1/19/10
to
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

0 new messages