Link to home
Start Free TrialLog in
Avatar of Thomasian
ThomasianFlag for Philippines

asked on

Joining 2 SQL Server Compact Edition 3.5 databases

How can I create a query/connection string to join 2 SQL Server CE 3.5 databases?

TIA
Avatar of ralmada
ralmada
Flag of Canada image

what do you mean by "join"? Are you trying to create a linked server? Check this link for the connection string syntax for SQL CE.
http://www.connectionstrings.com/sql-server-2005-ce 
More info on how to create linked servers here:
http://msdn.microsoft.com/en-us/library/ms190479.aspx
 
Avatar of Thomasian

ASKER

I am trying to create a query with tables from 2 SQL Server CE databases.

I cannot create link servers because there will be no instance of SQL Server running.

Have you tried ?
select * from server.database.owner.table a                               --(usually owner is dbo)
inner join server.database2.owner.table2 b on a.id = b.id
 
I am using SQL Server CE so there is no server. And the database is a file, so I need to specify the file name and password for each database. Maybe on the connection string?
I see. . Just curious, is it possible for you to use SQL express instead?
Anyhow, here are two links that I think will help you creating the connection to the databases:
http://www.c-solutions-inc.com/articles/SQLServer2005CompactEditionTutorial_CRUD--2007-09-24--Edition.pdf
http://erikej.blogspot.com/2008/10/accessing-sql-compact-from-sql-server.html 
And of course use the first link I've suggested. (connectionstring.com, see my first comment)
 
I have never really tried SQL Server Express, so I'm not familiar with it.

In SQL Server Express, will I need to have a database administrator to manage the database? Because in CE, the database is completely standalone and I can manage everything through code.


Actually, I know how to connect to a single sql server ce database. But I can't seem to find any documentation/samples that shows how to connect to 2 databases at the same time.
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have posted a new question to help me decide which version of SQL Server to use. Thanks for your help on this.

https://www.experts-exchange.com/questions/25105405/SQL-Server-Express.html?fromWizard=true