Dawid Mostert


Hi,

I'm looking at using SQL Server CE as a replacement for MS Access in a WIN32 Delphi Application. This limits my database options to Providers that is usable from ADO.

I see that the OLE DB Interfaces are implemented, but I can't connect to a SQL Server CE database from Delphi. I've cut and paste a sample connection string (replacing the data source bit) but no go

I've installed the Runtime Environment, VS2005 bit, Connectivity Tools and the SDK :)

Any help Anything that I might have missed

Thanks,

Dawid




Re: Using SQL Server CE in a NON .NET Delphi Application

Joao Paulo Figueira


Please make sure you have sqlceoledb30.dll registered on your desktop PC. What is the provider name you are using





Re: Using SQL Server CE in a NON .NET Delphi Application

Stephen Hauck

You can buy something like the Delphi native interface to SQL Server from CoreLabs (http://www.crlab.com/) instead of ADO.






Re: Using SQL Server CE in a NON .NET Delphi Application

Dawid_J_M

Hi,

The dll seems to be registered. I can also connect to a Sql Server CE database using VS 2005.

I'm using "Microsoft.SQLSERVER.MOBILE.OLEDB.3.0" as the provider.

It would seem that I can also setup the connection from Visual Basic 6.

Just looks like Delphi misbehaving And more specifically Delphi 6 at design time I get slightly futher with Delphi 2006, but still no real joy.

And no, I don't feel like spending additional money on using 1 Microsoft technology to connect to another Microsoft technology

Thanks for tips!

D.




Re: Using SQL Server CE in a NON .NET Delphi Application

Stephen Hauck

Are you up to date on your Delphi 2006 patches

Are you sure you are not using the .NET native driver in VS2005 and that is why it is suceeding

Good luck, I will give this a try from my office later tonight.





Re: Using SQL Server CE in a NON .NET Delphi Application

Dawid Mostert

Delphi 2006 patches are up to date.

Why is SQL Server CE not listed as a normal provider when setting up an ADO connection




Re: Using SQL Server CE in a NON .NET Delphi Application

BrianSquibb

Just for a laugh I loaded up VB4 and wrote a working CE application - amazing stuff





Re: Using SQL Server CE in a NON .NET Delphi Application

Stephen Hauck

I found this code to use OLEDB with VBA in the forums.

Dim cnx As ADODB.Connection
Set cnx = New ADODB.Connection
cnx.ConnectionString = "Provider='Microsoft.SQLSERVER.MOBILE.OLEDB.3.0.';Data Source='c:\\B.sdf';"
cnx.Open

I have not had a chance to test it but I have not been able to connect via Delphi 2006 either.

My gut says it has to be a Borland issue but.....

In another post in this forum ...

"You are right lysy.

we dont officially support ADO with SQL Server Everywhere. The sample code was given just to unblock. Going forward, I would advise you to move towards ADO.Net or OleDB stack. These two would be the officially supported data providers for SQL Server Everywhere.

-Vels"





Re: Using SQL Server CE in a NON .NET Delphi Application

Dawid Mostert

I've also seen this and it seems to be working in a VB App that I wrote.

Stupid question: I thought that ADO / OLE DB was basically the same And, is it not short sighted of MS NOT to support ADO

This seems like a dead duck to me :( Probably have to go with SQL Express then.






Re: Using SQL Server CE in a NON .NET Delphi Application

Stephen Hauck

SQL Express has it's own set of problems.

Well..... Borland has always had issues with OLE and such, I guess that they will have to get together a patch.

Have you submitted this in a Borland newsgroup yet





Re: Using SQL Server CE in a NON .NET Delphi Application

Dawid Mostert

Thanks for all the suggestions.

It would seem that a post in a Borland newsgroup is a good idea.

Scary bit: a search through Google returns this thread as the number 1 hit for Delphi and SQL Server CE.




Re: Using SQL Server CE in a NON .NET Delphi Application

Stephen Hauck

The reason for the "Sary Bit" is that most people like me use things like SQLite, Advantage or DBISAM when writing Delphi apps, I stumbled across your posting while researching compact edition.

From what I see I would use compact edition with Delphi apps if it "suddely" starts to be accessable from Delphi :)





Re: Using SQL Server CE in a NON .NET Delphi Application

Antaeus from Core Lab

Stephen Hauck wrote:

From what I see I would use compact edition with Delphi apps if it "suddely" starts to be accessable from Delphi :)



You can now do this with MS SQL Server Data Access Components (SDAC).
We have recently released a beta of SDAC 4, which supports MS SQL Server
Compact Edition (dl page http://crlab.com/sdac/download.html).





Re: Using SQL Server CE in a NON .NET Delphi Application

Dawid Mostert

Still doesn't help me as the new version does not support Delphi 6


D.




Re: Using SQL Server CE in a NON .NET Delphi Application

Antaeus from Core Lab

SDAC 4 for Delphi 6 and some other IDEs will be uploaded in the next couple of days.