Page 1 of 1

login

Posted: Tue 08 Dec 2015 19:19
by smarreco
I'm trying to establish a connection to a SQL Server Compact.
According to the manual , I should specify the database name at the TMSCompactConnection object.
Something like c:\test.sdf. But what kind of name is this?
MSSQL Server database files are _Data and _Log .MDF files.

Re: login

Posted: Wed 09 Dec 2015 15:12
by Ludek
I think you cannot use TMSCompactConnection for connecting to regular MS SQL database (.mdf & .ldf is used by "normal" sql server - enterprise, standard, express; NOT compact).
You should use TMSConnection to connect to running SQL instance with those files attached as database.

Re: login

Posted: Thu 10 Dec 2015 18:11
by smarreco
Bingo!

Thanks, Ludek.

Re: login

Posted: Fri 11 Dec 2015 11:21
by azyk
Ludek is right. The TMSCompactConnection component supports connection to SQL Server Compact Edition only (.sdf database file).

To connect to the database, whose files (.mdf and .ldf) are not attached to the running SQL Server instance, you should set the TMSConnection.Options.InitialFileName property value to the full path and full .mdf file name before connection. See more details about the InitialFileName property in our documentation:
https://www.devart.com/sdac/docs/?devar ... lename.htm .