Big problem with duplicate field names when converting Access prog to work with SQL Server
From: Andrew Cutforth (andrewc_at_ajcsoft.com)
Date: 01/20/04
- Next message: KKF: "Re: TStringGrid and TInplaceEdit"
- Previous message: Mike Collier: "Re: A Stored Procedure in SQL Server returning a recordset"
- Next in thread: J. M. De Moor: "Re: Big problem with duplicate field names when converting Access prog to work with SQL Server"
- Reply: J. M. De Moor: "Re: Big problem with duplicate field names when converting Access prog to work with SQL Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jan 2004 17:19:37 -0000
I am converting a large application that uses an Access database via ADO to
work with MS SQL Server also.
There are many places where it does "select table1.*, table2.* etc"
With Access if there are duplicate field names (e.g. "description") they are
returned fully qualified and you can reference them as "table1.description"
and "table2.description".
I have just discovered to my horror that SQL Server will not qualify the
names for you and returns these field names as "description" and
"description1".
Is there any way of altering this behaviour to return the fully qualified
field names as with Access ?
I know I should rewrite the queries to give aliases to the fields but there
maybe 1000's of places in the code and I want to avoid this.
Thanks for any help
- Next message: KKF: "Re: TStringGrid and TInplaceEdit"
- Previous message: Mike Collier: "Re: A Stored Procedure in SQL Server returning a recordset"
- Next in thread: J. M. De Moor: "Re: Big problem with duplicate field names when converting Access prog to work with SQL Server"
- Reply: J. M. De Moor: "Re: Big problem with duplicate field names when converting Access prog to work with SQL Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|