Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / June 2007

Tip: Looking for answers? Try searching our database.

odbc driver for SQL CE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marta - 20 May 2007 18:50 GMT
I want to connect to SQL CE database (Server Mobile) using Visual FoxPro. Is
there any driver or something else? Please help me, I am becoming desperate
Anders Altberg - 20 May 2007 19:49 GMT
Hi Marta,
There's no ODBC driver for SQL Server CE. You must use OLEDB, meaning the
ADODB and ADOX classes .
The CursorAdapter class in VFP is made for this.
Here's how you can create a connection in code.

LOCAL lcLocalConnectionstring AS String PRETEXT 8
TEXT TO lcLocalConnectionstring NOSHOW
Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;
Data Source=C:\projekt\SSCE\database\Test.sdf;
Mode=ReadWrite|Share Deny None;
SSCE:Max Buffer Size=640;
SSCE:Database Password='';
SSCE:Encrypt Database=False;
SSCE:Default Lock Escalation=100;
SSCE:Temp File Directory="";
SSCE:Default Lock Timeout=5000;
SSCE:AutoShrink Threshold=60;
SSCE:Flush Interval=10;
SSCE:Test Callback Pointer=0;
SSCE:Max Database Size=512;
SSCE:Temp File Max Size=128
ENDTEXT

LOCAL osqlce as adodb.connection
osqlce=CREATEOBJECT('ADODB.Connection')
osqlce.ConnectionString=lcLocalconnectionstring
lnConn=osqlce.Open()

>I want to connect to SQL CE database (Server Mobile) using Visual FoxPro.
>Is
> there any driver or something else? Please help me, I am becoming
> desperate
E®!k Visser - 20 May 2007 19:55 GMT
Marta,
>I want to connect to SQL CE database (Server Mobile) using Visual FoxPro.
>Is
> there any driver or something else? Please help me, I am becoming
> desperate

There is no ODBC driver for SqlCE. There is  a OLEDB provider. Not sure if
you can use that with VF however.

This is how a connectinostring could look like:

Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data
Source=D:\_uitwisseling\handhaving.sdf;Mode=ReadWrite|Share Deny
None;SSCE:Max Buffer Size=640;SSCE:Database Password=xyzzyx;SSCE:Encrypt
Database=False;SSCE:Default Lock Escalation=100;SSCE:Temp File
Directory="";SSCE:Default Lock Timeout=2000;SSCE:AutoShrink
Threshold=60;SSCE:Flush Interval=10;SSCE:Test Callback Pointer=0;SSCE:Max
Database Size=128;SSCE:Temp File Max Size=128

hth

Erik Visser
Anders Altberg - 21 May 2007 17:17 GMT
Hi Erik
Visual FoxPro can use COM class objects - no problem, but ODBC is supported
in a lot a native functions.
Actually the RecordSet object in VB began life as an adaptation of VFP's
local cursor object and remote connectivity.
-Anders

> Marta,
>>I want to connect to SQL CE database (Server Mobile) using Visual FoxPro.
[quoted text clipped - 18 lines]
>
> Erik Visser
E®!k Visser - 21 May 2007 18:55 GMT
Hi Anders,

> Hi Erik
> Visual FoxPro can use COM class objects - no problem, but ODBC is
> supported in a lot a native functions.
> Actually the RecordSet object in VB began life as an adaptation of VFP's
> local cursor object and remote connectivity.

Ah, nice to know as I am not familiair with both, (VB or Fox ), I use
another great xBase language. Visual Objects and Vulcan(=VO).NET but that is
not released yet. VO does not support ADO itself other than by
oleAutoobject(), but there is a very nice 3pp product for using ADO and
ADOX.  Great combination.

regards,

Erik Visser

> -Anders
>
[quoted text clipped - 20 lines]
>>
>> Erik Visser
Jezza - 15 Jun 2007 03:05 GMT
From other replies it seems like there is no ODBC driver which is a pity
since I have an Access App which has linked tables to a SQL server back end
and I would like to be able link those tables to a SQL CE database as well
but with the apparent lack of an ODBC driver this is not possible
- Does anyone know any different?

> I want to connect to SQL CE database (Server Mobile) using Visual FoxPro. Is
> there any driver or something else? Please help me, I am becoming desperate
William (Bill) Vaughn - 16 Jun 2007 08:27 GMT
There is a limited-functionality OLE DB provider.

Signature

____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

> From other replies it seems like there is no ODBC driver which is a pity
> since I have an Access App which has linked tables to a SQL server back
[quoted text clipped - 7 lines]
>> there any driver or something else? Please help me, I am becoming
>> desperate
Jezza - 18 Jun 2007 06:11 GMT
Are you refering to Kagera?
http://msdn2.microsoft.com/en-us/library/ms712975.aspx

That's an OLE DB wrapper around any ODBC driver; I need a wrapper to go the
other way - an ODBC wrapper around the CE OLE DB driver.

> There is a limited-functionality OLE DB provider.
>
[quoted text clipped - 9 lines]
> >> there any driver or something else? Please help me, I am becoming
> >> desperate
William (Bill) Vaughn - 18 Jun 2007 16:58 GMT
No. There is a SqlCE OLE DB provider. Currently, there is no ODBC provider.

Signature

____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

> Are you refering to Kagera?
> http://msdn2.microsoft.com/en-us/library/ms712975.aspx
[quoted text clipped - 19 lines]
>> >> there any driver or something else? Please help me, I am becoming
>> >> desperate
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.