Component to access sdf database table
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
Component to access sdf database table
I've bought a piece of software that stores its database in an .sdf file which I've discovered is a MS SQL Server Compact Edition database. If I was to use the SDAC components how difficult would it be for me to access the tables within this .sdf file? I currently use the MyDAC components to access MySQL databases but, since I installed MySQL on the PC myself, I've no difficulty identifying the connection but I'd be totally lost as to filling in properties associated with this .sdf file. I know where the .sdf is located but that's about it.
Hello,
You can use the TMSConnection or TMSCompactConnection components to access the sdf file. Here are code examples:For more information, please read the "Working with SQL Server 2005 Compact Edition" article of the SDAC documentation.
You can use the TMSConnection or TMSCompactConnection components to access the sdf file. Here are code examples:
Code: Select all
MSCompactConnection.Options.CompactVersion := cv35;
MSCompactConnection.Database := 'D:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\northwind.sdf';
MSCompactConnection.LoginPrompt := False;
MSCompactConnection.Open;
Code: Select all
MSConnection.Options.Provider := prCompact;
MSConnection.ConnectString := 'Provider=MICROSOFT.SQLSERVER.MOBILE.OLEDB.3.5';
MSConnection.Database := 'D:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\northwind.sdf';
MSConnection.LoginPrompt := False;
MSConnection.Open;
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
Thanks AndreyZ.
I downloaded the components to test it but when trying to install them I get that message about being incompatible with existing components. From looking up the FAQ's I see it would mean I'd also have to update my MyDAC components to the latest version which would mean updating my subscription to them as well as paying for the ms components which I can't exactly afford at the moment.
I downloaded the components to test it but when trying to install them I get that message about being incompatible with existing components. From looking up the FAQ's I see it would mean I'd also have to update my MyDAC components to the latest version which would mean updating my subscription to them as well as paying for the ms components which I can't exactly afford at the moment.
Product compatibility is provided for the current build only. To make MyDAC and SDAC work simultaneously on the same IDE, you should use the latest versions of them. The latest compatible versions are the following: MyDAC 6.10.0.7, SDAC 5.10.0.6.
If you don't want to upgrade MyDAC, you can install SDAC on another computer where you don't have MyDAC, or temporary uninstall MyDAC. In both cases you will be able to test SDAC.
If you don't want to upgrade MyDAC, you can install SDAC on another computer where you don't have MyDAC, or temporary uninstall MyDAC. In both cases you will be able to test SDAC.
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44