HOW TO: ????? ????? ???? ? ? ????? ??????? (SQL Server CE ?????)

?????? ????????? ?????? ?????????
???? ???????: 320785 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? ??? ??????? ???? ?????? ???? ???? ???? ????? ????? ????????? ????? ?????? ???? ??????? ??? ????? ?????? SQL Server CE. ??????? ????? ????????? ?????? ?????? ?????? ??????? ?? ??????.

SQL Server CE ?????

  1. ??? ????? ????? ???? ?? Microsoft Visual Basic. ??? ????? Form1 ???? ???????.
  2. ????? ????? ????? ????? Form1.
  3. ????? ????? ??????? ??? ????? ?????? Command1 ??? ????? ????? ????????. ????? ????? ??????? ??? ????? ?????? Command2 ??? ????? ????. ????? ????? ??????? ??? ????? ?????? Command3 ??? ????? ?????????.
  4. ?? ??????? ??????? ???? "?????". ???? ?? ????? ??????? ???????:
    CE Microsoft ADO Ext. 3.1 ?? DDL
    ?????? ???? Microsoft SQL CE 1.0
    ?????? ADO CE Microsoft 3.1
  5. ?????? ?? ????? Microsoft ADO ??????? Windows CE SDK (ADOCE) ? SQL Server CE ?????? ?? ??????? ??????? ???? ??? ?????. ?? ????? ??????? ??? ?????? ??? ????? ????????. ?? ???? ??????? ?????? ????? Components ????? ???? ?????? ????? ???????. ?? ?????? ???? ??? Update ? ???? ?????? ????? ???????? ?????? Project ? ????? ??? ???????.

????? ????? ????? ??????

?????? ????? ?????? ??????? ????? ????????? ???????? ???:

??? ?? ?? ???? ???????? ???????? ??????? ?? ????? Command1_Click:
Dim cat As ADOXCE.Catalog
Set cat = CreateObject("ADOXCE.Catalog.3.1")
cat.Create "Provider=Microsoft.SQLSERVER.OLEDB.CE.1.0; data source=\DATAB.sdf"
MsgBox "Database Created"
				


????? ????? ????

?????? ???? ??????? ????? ????????? ???????? ???:

??? ?? ?? ???? ???????? ???????? ??????? ?? ????? Command2_Click:
Dim str_Connection As String
Dim cn As ADOCE.Connection

str_Connection = "Provider=Microsoft.SQLSERVER.OLEDB.CE.1.0; data source=\DATAB.sdf"
Set cn = CreateObject("ADOCE.Connection.3.1")
cn.Open str_Connection
cn.Execute "Create table table1(id int NOT NULL, field1 nvarchar(1))"
cn.Execute "CREATE UNIQUE INDEX idx1 ON table1(id)"
cn.Execute "insert table1 values (1, 'A')"
cn.Execute "insert table1 values (2, 'B')"
cn.Execute "insert table1 values (3, 'C')"
cn.Close
Set cn = Nothing
MsgBox "Table Created"
				

????? ????????? ????

????????? ?? ???? ??? ???????? ??????, ???? ??????? ???????:
  1. ??? ?? ?? ???? ???????? ???????? ??????? ?? ????? Command3_Click:
    Dim cn As ADOCE.Connection
    Dim rs As ADOCE.Recordset
    Set cn = CreateObject("ADOCE.Connection.3.1")
    Set rs = CreateObject("ADOCE.Recordset.3.1")
    cn.Open "Provider=Microsoft.SQLSERVER.OLEDB.CE.1.0; data source=\DATAB.sdf"
    rs.Open "select * from table1 where field1='A'", cn, adOpenKeyset, adLockReadOnly
    Dim x As Integer
    x = 0
    For x = 0 To rs.RecordCount - 1
        MsgBox rs(1).Value
        rs.MoveNext
    Next
    rs.Close
    Set rs = Nothing
    cn.Close
    Set cn = Nothing
    					

  2. ??? ??????? ?? ?? ?????? ??????? ??? ?? ???? ????? ?? ????.
  3. ???? ??? ?? ????? ????? ????? ????????.
  4. ???? ??? ?? ????? ????? ????.
  5. ???? ??? ?? ????? ????? ?????????. ???? ???? ???? ??????? ???? ???? ????? "A".

?????

??? SQL Server CE ???????; ???????: "??? ????????"

?????? ??? ???? ?? ?????????? ?? ?????? ????? Microsoft ??????? ??? ?????:

Troubleshooting SQL Server CE Connectivity Issues

SQL Server CE 1.1 Service Pack 1 Update

???????

???? ???????: 320785 - ????? ??? ??????: 13/?? ?????/1427 - ??????: 2.4
????? ???
  • Microsoft SQL Server 2000 Windows CE Edition
  • Microsoft SQL Server 2000 Windows CE Edition 1.1
  • Microsoft SQL Server 2000 Windows CE Edition 1.1 Service Pack 1
  • Microsoft SQL Server 2000 Windows CE Edition 1.1 SP1 Update
????? ??????: 
kbmt kbgraphxlink kbhowto kbhowtomaster KB320785 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????320785
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com