I am migrating a jet database to MS SQL Server. The application is well established and contains tens of thousands of lines of code and possibly well over a 100 thousand line of code.
When using adodb recordsets (in vb.net) to query a jet database and joining tables that have columns with the same name (select a.foo, b.foo), you get TableName.Column returned for those fields that have the same name.
But when querying a sql server (MS SQL), you get the ColumnNames only so if you have two tables a and b and with each having a column with the name foo, you would get two columns both named "foo" where as with the jet database you get a.foo and b.foo
I am fully aware that you can use "as" in your select statement to alias the column name like (select a.foo as a_foo, b.foo as b_foo) but I don't want to do that - I don't have time to go through the thousand or so of select statements in the app.
So I am asking if anyone knows of a way that SQL would be able to behave like a jet database and return the TableName.ColumnName
for fields with similar name,
or if someone knows for sure that mssql can only return ColumnName without TableName, then which database engine can do what Jet database does?
By the way, the Jet database does that only when using a direct connection string syntax, otherwise it would behave the same way as SQL Server if accessing the data via ODBC.