[wix-users] Write and read data from SQL Compact Edition (.sdf)

Elena Aralla elena.aralla at gmail.com
Wed Jul 18 06:58:00 PDT 2018


I need to query on a Microsoft SQL Server Compact (SQL CE) database, for which there is no concept of server, instance, user and pasword.

So even using your extension, how can I configure the tag to run the query?

In my Product.wxs file, I tried to copy the database and then to execute a script, but it doesn’t work!

    <DirectoryRef Id = "DBDIRECTORY">
      <Component Id = "pec.sdf" Guid = "d8788de4-6537-42df-9c4a-4ac3312b31b8">
        <File Id = "pec.sdf" Source = ".. \ database \ empty_pec.sdf" Name = "pec.sdf" KeyPath = "yes" Checksum = "yes" />

        <sql: SqlDatabase Id = "SqlDatabase" Database = ".. \ database \ pec.sdf" User = "SQLUser" Server = "localhost" CreateOnInstall = "yes" DropOnUninstall = "yes" ContinueOnError = "no">
          <sql: SqlScript Id = "CreateTable" BinaryKey = "CreateTable" ExecuteOnInstall = "yes" ContinueOnError = "no" />
        </ Sql: SqlDatabase>
      </ Component>
    </ DirectoryRef>

I tried to use a custom action to query the database, but the custom action does not return the value read from the database!

Some idea?
Thank you.

More information about the wix-users mailing list