Discussion in 'microsoft.public.sqlserver.ce' started by Oliver, Feb 13, 2009.

  1. Oliver

    Oliver Guest


    I know that SQL CE can be used through both .NET and native libraries in
    Windows CE 6.0.

    Is there a way in which classic ASP 3.0 can access a SQL CE database
    directly (i.e. a .sdf file)? I have seen a number of connection strings, but
    nothing works and the general oppinion on some posts that I have read
    elsewhere seems to be that it can't be done.

    This may be a little beyond my experience, but does anyone think it may be
    possible through creating a native DLL and using the "Remote Configuration
    Framework" to generate HTML?

    I have an SQL CE database that has a number of settings that I need to be
    able to edit. Ideally I would like the Windows CE device to present a website
    to the user where the user can submit changes. From what I have read it seems
    that the Remote Configuration Toolkit could do the job?

    Or maybe ISAPI and HTTPD?
    Or create a custom COM object to use with ASP?

    Any oppinions from some experts?


    Oliver, Feb 13, 2009
    1. Advertisements

  2. Hey Oliver,

    We have not tried and not heard of some one trying to use SQL CE in native
    ASP. However, people did try using ADO over OLEDB to access SQL CE. Though
    I am not sure, I believe ADO is usable in native ASP. Please note that, SQL
    CE is not meant to be used in the following scenarios and is not supported.

    1) In Web Client or in Web Server
    2) Using ADO

    You might try your luck using ADO, but officialy SQL CE does not support it.

    Laxmi Narsimha Rao Oruganti [MSFT], Feb 13, 2009
    1. Advertisements

  3. Oliver

    Oliver Guest

    Alright, I've decided that I am going to use ISAPI extentions to feed some
    basic data from the SQL CE 3.5 database on the Windows CE 6.0 device. Some
    processing of the data I will probably do on the client browser using
    Javascript (together with the Dojo Toolkit).

    I am unfortunately going to need just a little bit of spoon feeding here,
    because believe me I have spent around 12 hours trying to figure out how to
    connect to an SQL database through a native DLL that I made. I know that the
    ISAPI extensions works because I managed to create a TestISAPI.dll and it
    displays "Hello World" on the browser, but I can't get anything to connect to
    an sql database.

    I would like to simply do the following:

    1. Open "database.sdf".
    2. Open table "Data".
    3. Run query "SELECT * FROM Data".
    4. Print each column separated by a comma on a line and each row on a new

    I have seen the Northwind samples but they are way above my head because
    they try to cover such a broad range of things. My .NET is excellent, my
    linux C is ok, but Win32 C/C++ is quite limited.

    I need a kick start guide or something that covers the basics first, not the
    entire API in one example such as Northwind samples. I appreciate any help
    because I am seriously facing a massive brick wall.

    Oliver, Feb 22, 2009
  4. Oliver

    Oliver Guest

    I ended up buying the Hitchhiker's Guide to Microsoft SQL Server 2005 Compact
    Edition eBook so just waiting for the transaction to complete so that I can
    download it and hopefully that will give me some hints.

    I hope that once (if) I can figure this out I will be able to provide a
    tutorial of some sort for others to use. I'll let you know how I go.
    Oliver, Feb 23, 2009
  5. Oliver

    Oliver Guest

    Well, turns out that this particular book only covers .NET and not native
    programming, bummer so much for that idea. Luckily it didn't cost much.

    Don't get me wrong, the book really explains the database in a lot of
    detail, but unfortunately only for VB.NET. Back to square one!
    Oliver, Feb 23, 2009
  6. Well, I am confused on when I have suggested that book in this mail thread
    context. I double checked the mail thread and I dont see telling to buy
    that book for this purpose. Am I missing something?

    Laxmi Narsimha Rao Oruganti [MSFT], Feb 24, 2009
  7. Oliver

    Oliver Guest

    Sorry it wasn't you who suggested it. It was actually the author of the book
    suggesting it in another thread quite a few months ago. I decided to get it
    because it is so cheap that I thought might as well go have a look. Turns out
    there was no native code in there so wasn't much good for this particular

    You're not missing anything so don't worry!

    I still haven't found a solution to the problem though. I was thinking of
    using .NET to generate sets of data text files that I could read rather than
    reading SQL databases.

    I have made a little bit of progress though using ISAPI extensions, but I'm
    stuck trying to actually read a rowset and writing it out to the website. I'm
    not very good with C++ yet so I'm totally lost on many things. I've managed
    to open a database, create a session but don't know how to actually read out
    all the data into a string. I guess that's more of a C++ question.
    Oliver, Feb 25, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.