mssqlce35 how to manually craete database (sdf)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mvictor
Posts: 9
Joined: Tue 11 Aug 2009 15:38

mssqlce35 how to manually craete database (sdf)

Post by mvictor » Tue 29 Sep 2009 11:44

how to manually craete database (sdf) in ms sql compact edition using unidac

thanks

tobias_cd
Posts: 56
Joined: Thu 18 Dec 2008 22:10

Post by tobias_cd » Tue 29 Sep 2009 12:20

Have you tried to connect to "master" database and then execute CREATE DATABASE statement?

mvictor
Posts: 9
Joined: Tue 11 Aug 2009 15:38

Post by mvictor » Tue 29 Sep 2009 12:50

i have not any database. I have only empty folder (probable with sqlcompact dll files)
Can i create database in this folder using only UNIDAC and fill its ?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 30 Sep 2009 07:51

UniDAC creates database automatically if it does not exist for SQL Server Compact Edition.

mvictor
Posts: 9
Joined: Tue 11 Aug 2009 15:38

Post by mvictor » Wed 30 Sep 2009 15:30

Code: Select all

uniconnection.database:='d:\temp\xxuni.sdf'
//this sets in design mode
//uniconnection.providername:=sql server
//uniconnection.specificoptions.compactversion=cv35
//uniconnection.specificoptions.oledbprovider=prCompact
uniconnection.connected:=true
and i have error message:
It is not succeeded to find the file of database. Check up a way to the database [0, 0, 0,Data Source: d:\temp\xxuni.sdf,,]

where my error?
thanks
P.S.

Understood
you code do not work if sqlcompact library is not english version, for example russian

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 02 Oct 2009 07:39

Yes, you are right. SQL Compact Edition database is created by default only when English version of the SQL CE library is used.

Post Reply