Ailsom, You can't give the database an alias unfortun ately but how about using macro substitution as per the following. That way you can chage just one line in the program to affect all database references.
DB_NAME="CustomerData.dbo" SELECT A.ProdId,A.ProdName,B.Price AS CustomerPrice FROM Products B INNER JOIN &DB_NAME..Products B Dave Crozier The secret to staying young is to live honestly, eat slowly, and to lie about your age -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ailsom F. Heringer (Osklen) Sent: 04 September 2006 15:00 To: ProFox Email List Subject: VPF+SqlServer: Database alias ??? Foxers, We are developing an application that uses two distinct databases, the default dabatabe set in the connection string, and a second one used in some subqueries. Is it possible to create an alias to the second database ? Think about a future database migration, I don´t want to use the literal name of the database ("CustomerData.dbo"). eg: SELECT A.ProdId,A.ProdName,B.Price AS CustomerPrice FROM Products B INNER JOIN CustomerData.dbo.Products B -- Aílsom F. Heringer [EMAIL PROTECTED] Skype: ailsom.osklen Analista de Sistemas ---------------------------------- Osklen Departamento de Informática Rio de Janeiro - RJ BRASIL http://www.osklen.com.br 55 21 22198971 [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

