Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8073361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:19:14+00:00 2026-06-05T14:19:14+00:00

I wrote an application in C#, which stores its data in a SQL Server

  • 0

I wrote an application in C#, which stores its data in a SQL Server CE database (v3.5). I would like to use these data from a Delphi application. I found information about how to access an SDF file from Delphi code, so this part is clean and simple.

Unfortunately, there are cases when the Delphi application should be able to create the SDF file first. I guess I need to write an ORM DLL in C# (the DataContext subclass) and use it from both applications (from Delphi through COM Interop), but I’m not sure this is a good idea. Any advice would be greatly appreciated.

(I have Delphi 6 and XE2.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:19:16+00:00Added an answer on June 5, 2026 at 2:19 pm

    You can use the Create method of the Catalog Object (ADOX)

    Try this sample app

    {$APPTYPE CONSOLE}
    
    {$R *.res}
    
    uses
      ActiveX,
      ComObj,
      SysUtils;
    
    procedure CreateSQLCeDatabase(const DataBase : string);
    Var
      Catalog : OleVariant;
    begin
      Catalog := CreateOleObject('ADOX.Catalog');
      Catalog.Create(Format('Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=%s',[DataBase]));
    end;
    
    begin
     try
        CoInitialize(nil);
        try
          CreateSQLCeDatabase('C:\Data\Bar.sdf');
        finally
          CoUninitialize;
        end;
     except
        on E:EOleException do
            Writeln(Format('EOleException %s %x', [E.Message,E.ErrorCode]));
        on E:Exception do
            Writeln(E.Classname, ':', E.Message);
     end;
     Writeln('Press Enter to exit');
     Readln;
    end.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an application which stores its data in SQL Server. Each table has
I am planning for monitoring application which will use SQL Server 2005/08 database. It
I want to create gallery application which would get thumbnails and metadata from web
I have to build such application in which i have to use the database
I have a cakePHP application that is pulling data from two different databases, which
I wrote an application which allows people to contribute plugins to extend the functionality.
I wrote an application which uses spring framework. now i wanted to write a
I wrote a simple WinAPI application in C++ which embeds the Abode Flash ActiveX
I have a web application with some data in its datastore. I have just
Greetings fellow earthlings. I'm researching methods of caching data retrieved from various database tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.