Freigeben über


Windows 2000 Support for SQL Server 2005 Compact Edition

Hi,

 

We have been getting good feedback from you all on the CTP release of SQL Server 2005 Compact Edition or SSCE 3.1 for short. SQL Server 2005 Compact Edition (version 3.1) is the next version of SQL Server 2005 Mobile Edition (version 3.0).

 

One question on CTP has been on the platforms supported by SSCE 3.1. For CTP we had deliberately omitted Windows 2000 from the list of supported platforms because with Windows Vista around the corner we want to limit the platforms to contain the test effort. Based on feedback from you on the importance of supporting Windows 2000 we have added Windows 2000 to the list of features that we’ll support for the RTW version of SSCE 3.1.

 

A second question that has come up is accessing SSCE 3.1 from VB 6 using the OLEDB interface. The sample skeleton code below shows how to accomplish it in VB 6. The code assumes that there is a sample SSCE 3.1 database at c:\MyDB.sdf, which has a table ‘Employee’ with three columns. Note that there is a sample program that shows how to access OLEDB thru C++ at https://msdn2.microsoft.com/en-us/library/ms173261.aspx.

 

One thing that I want to clarify is that the version number in the provider string is 3.0 and not 3.1 because there is incremental difference only between SQL Server 2005 Mobile Edition and SSCE 3.1. In a future version of SSCE we will likely change the version number in the provider string.

 

    Dim pConn As ADODB.Connection

    Dim pRS As ADODB.Recordset

    Dim sStr As String

    Set pConn = New ADODB.Connection

    Set pRS = New ADODB.Recordset

  

   pConn.ConnectionString= "PROVIDER=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\\MyDB.sdf"

   

    pConn.Open

    sStr = "Select * from employee"

    ' Open the recordset

    pRS.Open sStr, pConn, adOpenForwardOnly

  

   Do Until pRS.EOF

     ' Employee table has an emp_fname column that represents the first name of employee

     ' List1 is a list control

     List1.AddItem pRS!emp_fname

     pRS.MoveNext

   Loop

   pRS.Close

   pConn.Close

 Set pRS = Nothing

 Set pConn = Nothing

 

 

The following snippet of ADO code shows how to print the table and column names using the same connection object as above:

 

Dim rsFields As ADODB.Recordset

Set rsFields = pConn.OpenSchema(adSchemaColumns)

Do Until rsFields.EOF

Debug.Print "Table: " & rsFields!TABLE_NAME

Debug.Print " Field: " & rsFields!COLUMN_NAME

rsFields.MoveNext

Loop

 

 

Thanks and keep the feedback coming.

 

Regards,

Sitaram Raju

Comments

  • Anonymous
    May 02, 2007
    Could you give an example of how to update the employee table using ado.   We continuely get "Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype" when attempting to update a SSCE table. Any help would be appreciated.