Discussion:
Is it possible to use an ODC file to access data in an SDF file?
(too old to reply)
Anthony Wieser
2009-10-27 22:15:43 UTC
Permalink
The data connection wizard in Office 2007 lists a Microsoft OLEDB provider
for SQL Server 3.5, but unfortunately, even if you manage to save the ODC
file, it doesn't actually allow you to fetch any data.

Maybe its wishful thinking, but is there any way to edit the ODC file, and
get it to work; I'd like to believe its just the wizard that generated
something wrong.
--
Anthony Wieser
Wieser Software Ltd
ErikEJ
2009-10-28 13:33:00 UTC
Permalink
I have tried as well, but knowing that the SQL Compact OLEDB provider is not
your standard desktop OLEDB provider, I concluded that there was no way to
make it work. An alternative approach (that works), is using VBA code to get
the data, as demonstrated here:
http://erikej.blogspot.com/2008/04/import-sql-compact-data-to-excel.html
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by Anthony Wieser
The data connection wizard in Office 2007 lists a Microsoft OLEDB provider
for SQL Server 3.5, but unfortunately, even if you manage to save the ODC
file, it doesn't actually allow you to fetch any data.
Maybe its wishful thinking, but is there any way to edit the ODC file, and
get it to work; I'd like to believe its just the wizard that generated
something wrong.
--
Anthony Wieser
Wieser Software Ltd
Anthony Wieser
2009-10-28 14:07:57 UTC
Permalink
Thanks for your suggestion. I've seen that code and it might be able to
help a little.

I was hoping to have something more permanent so that I could easily do a
mail merge into word, just by attaching a mail merge query to a particular
sdf or ODC file.
It seems there really isn't any way at all to support that.

Is there any reason it couldn't be supported? Could we write our own OLEDB
provider that actually did work?

Anthony Wieser
Post by ErikEJ
I have tried as well, but knowing that the SQL Compact OLEDB provider is
not your standard desktop OLEDB provider, I concluded that there was no
way to make it work. An alternative approach (that works), is using VBA
http://erikej.blogspot.com/2008/04/import-sql-compact-data-to-excel.html
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by Anthony Wieser
The data connection wizard in Office 2007 lists a Microsoft OLEDB
provider for SQL Server 3.5, but unfortunately, even if you manage to
save the ODC file, it doesn't actually allow you to fetch any data.
Maybe its wishful thinking, but is there any way to edit the ODC file,
and get it to work; I'd like to believe its just the wizard that
generated something wrong.
--
Anthony Wieser
Wieser Software Ltd
ErikEJ
2009-10-28 18:24:19 UTC
Permalink
If you were very clever and had masses of time, you might be able to write
your own OLDB provider. But it would probably be cheaper to write a generic
Office add-in to do the work.
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by Anthony Wieser
Thanks for your suggestion. I've seen that code and it might be able to
help a little.
I was hoping to have something more permanent so that I could easily do a
mail merge into word, just by attaching a mail merge query to a particular
sdf or ODC file.
It seems there really isn't any way at all to support that.
Is there any reason it couldn't be supported? Could we write our own
OLEDB provider that actually did work?
Anthony Wieser
Post by ErikEJ
I have tried as well, but knowing that the SQL Compact OLEDB provider is
not your standard desktop OLEDB provider, I concluded that there was no
way to make it work. An alternative approach (that works), is using VBA
http://erikej.blogspot.com/2008/04/import-sql-compact-data-to-excel.html
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by Anthony Wieser
The data connection wizard in Office 2007 lists a Microsoft OLEDB
provider for SQL Server 3.5, but unfortunately, even if you manage to
save the ODC file, it doesn't actually allow you to fetch any data.
Maybe its wishful thinking, but is there any way to edit the ODC file,
and get it to work; I'd like to believe its just the wizard that
generated something wrong.
--
Anthony Wieser
Wieser Software Ltd
Loading...