dbTalk Databases Forums  

SQL queries in .NET; table name prefix not added

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss SQL queries in .NET; table name prefix not added in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hans Groeneveld
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.