Page 1 of 1

mssqlce35 how to manually craete database (sdf)

Posted: Tue 29 Sep 2009 11:44
by mvictor
how to manually craete database (sdf) in ms sql compact edition using unidac

thanks

Posted: Tue 29 Sep 2009 12:20
by tobias_cd
Have you tried to connect to "master" database and then execute CREATE DATABASE statement?

Posted: Tue 29 Sep 2009 12:50
by mvictor
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 ?

Posted: Wed 30 Sep 2009 07:51
by Plash
UniDAC creates database automatically if it does not exist for SQL Server Compact Edition.

Posted: Wed 30 Sep 2009 15:30
by mvictor

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

Posted: Fri 02 Oct 2009 07:39
by Dimon
Yes, you are right. SQL Compact Edition database is created by default only when English version of the SQL CE library is used.