You could try creating a view into the other databases, e.g: CREATE VIEW dbo.vwUser AS SELECT * FROM registration.dbo.[User] (Where registration is the database name ) Or you can just reference the other databases remotety, e.g.: SELECT * FROM registration.dbo.[User] I think the first option is better, as then the code or stored proc isn't dependant on a database name. Hope this helps, Chris. -----Original Message----- From: Osullivan Karl (RKB) Senior Analyst/Programmer [mailto:[EMAIL PROTECTED] Sent: 14 January 2004 08:50 To: CF - Development Group Subject: [ cf-dev ] Connecting to tables in different SQL Server databases.
UHCWT Logo Hi All I need to do a query that links tables across SQL Server databases that are on the same server. I'm unsure how to do this in CF, as when I set up a datasource it points to one database only. Does anyone have any ideas how to do it please? Thanks Karl O'Sullivan Senior Analyst/Programmer Computer & Network Services UHCW NHS Trust Clifford Bridge Road COVENTRY CV2 2DX Contact: Tel (internal): 28952 Tel (external): +44 (0) 24 7696 8952 Email: [EMAIL PROTECTED] Web: www.uhcw.nhs.uk
