SQL Server CE 2.0 databases on desktop using ADO / OLE DB / VFP

Is it possible to create an SDF file that is compatiable with SQL Server CE 2.0, on a desktop language using ADO and Visual FoxPro ? Ideally I am looking for an OLE DB Provider on a desktop to do this, but I am not sure if its possible ?

I have successfully created a SDF database on PC using the Microsoft.SQLSERVER.CE.OLEDB.3.5 provider and that works fine.

Whenever I change my code to use "Microsoft.SQLSERVER.CE.OLEDB.2.0" it displays an error OLE IDispatch exception code 0 from Microsoft OLE DB Service Components: Class not registered.

I need to use SQL Server CE 2.0 as it is a legacy application I am working with so it has to be in this format.
chriscboyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Olaf DoschkeSoftware DeveloperCommented:
Class not registered means what it says. If you're getting this on your dev machine, test it on the target machine. If it doesn't work there, the installed version is not 2.0 anymore. Maybe it was updated over the years.

You might try using the version independent ole class name Microsoft.SQLSERVER.CE.OLEDB and see if that works.

Bye, Olaf.
0
chriscboyAuthor Commented:
Hi Olaf,

Thanks for your comments.

Upon further investigation I found out that you can only work on 2.0 databases from the actual device and not on the desktop. As I workaround I will create a T-SQL file containing the data structures and data and read this on the device to create the SDF file I need.

Regards

Chris
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
chriscboy, do you still need help with this question?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

chriscboyAuthor Commented:
Nope. I got it figured out in the end. What I was trying to do was not possible.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Then request to delete this question.
Cheers
0
chriscboyAuthor Commented:
I would like to leave this question, just in case someone else has the same issue? It took a lot of time to find out that I could not do want I wanted. It might save someone else a lot of wasted time if they find this question.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Ok. You can accept your own comment as solution so this question will be closed but not deleted.
0
chriscboyAuthor Commented:
I read on a website somewhere that what I was trying to achieve was not technically workable.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.