new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g....

26

Transcript of new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g....

Page 1: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

�������� ��� �� ���������������� ��� �� ��������

Page 2: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���� ����

������������� ��������������� ��

�������������������������� ������������������������������ ����

������������������������������������������������

�� ��������� �����!�������� ��������� �����!�������� ��������� �����!�������� ��������� �����!������

������"���#���������"���#���

Page 3: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

�� ������������ � �� ������������ �

���$#�������$#����

% ��$����������������& �'�������()% ��$����������������& �'�������()

* ����& ������������� ��"�� ��#���#��� ���* ����& ������������� ��"�� ��#���#��� ���

% �+$$����$������& ����#������$#�����% �+$$����$������& ����#������$#�����

,#���#�!����-�'�#�������& �$$�& ���,#���#�!����-�'�#�������& �$$�& ���

���"�� ����-����$�.�$��'���"�� ����-����$�.�$��'

������������������������������������������������

������������������������-��������������$'�& �'����!�-��������������$'�& �'����!�

�� ��������� �����!�������� ��������� �����!������

Page 4: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���� ����

������������� ��������������� ��

�������������������������� ������������������������������ ����

������������������������������������������������

�� ��������� �����!�������� ��������� �����!�������� ��������� �����!�������� ��������� �����!������

������"���#���������"���#���

Page 5: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

��������������� ������������������ ���

��������������������$���������������$�������

/����/ ������ ����!�� ����! ������������������������ ����0����!�����������0����!�������.��& ���������.��& ���������

1�����$�����1�����$������� �������������������������������������� �$�����$����

���"�� ������������!�������"�� ������������!�������"�� ������������!�������"�� ������������!����

�������������������$�2������34 �������& ��������.����'������$�2������34 �������& ��������.����'�"�� �����"�� �����

5�!��6�/-� � ��'�����.���& �����#��!�5�!��6�/-� � ��'�����.���& �����#��!�

4 ����!�����!������4 ����!�����!������������������������$�& ����$��!������$�& ����$��!������������������

Page 6: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

! "�#��$����%�����&�'������(� ��������)��)����*�

! "�#��$����%�����&�'������(� ��������)��)����*�

End

-to-

End

Tim

e (lo

wer

is b

ette

r)

100 1000 10000 100000

Rows in DataSet

End

-to-

End

Tim

e (lo

wer

is b

ette

r)

Xml

Binary

Page 7: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

������ ������������������� �������������

��& �.����'��� ����!��������������������& �.����'��� ����!������������������

7��#��������� � ��'-�6�/ �����.���& �����7��#��������� � ��'-�6�/ �����.���& �����#��$�2�����#��$�2�����

� ����� �������������������� ��8������')� ����� �������������������� ��8������')

����.$���.'���"�#$��8.�������.$���.'���"�#$��8.������� ���)�� ���)����.$���.'���"�#$��8.�������.$���.'���"�#$��8.������� ���)�� ���)

��������7� ����!9�� ����������'��������7� ����!9�� ����������'

����0���!�������0���!���

6���!�������������������� �$'�"�����6���!�������������������� �$'�"�����

����0�#�������� ���$���������������-����������"�����0�#�������� ���$���������������-����������"��$�������$������$�������$�����

Page 8: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���������+ ��,�&��%���������+ ��,�&��%

�������������$����������.$��$����������.$�

:�#�����$����������������$'�������.$������� ��:�#�����$����������������$'�������.$������� ��!����������!����������

��!�����#�����$#��"�� ���& �.���������!�����#�����$#��"�� ���& �.�������

:�#����������������������������'& �':�#����������������������������'& �':�#����������������������������'& �':�#����������������������������'& �'

����� ��!����� ��!

:�#������������7�����-�.#��& ��������.$�:�#������������7�����-�.#��& ��������.$�

��*��*

:�#��������������.$�-�.#��& ������������:�#��������������.$�-�.#��& ������������

Page 9: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

+ ��,�&��%+ ��,�&��%

������.$��������� ����������.$��������� ����

4 ������ ���������������������� ����4 ������ ���������������������� ��������$�.$�����������.$�����$�.$�����������.$�

7���3 $-�% ����3 $-�& �.��������;�� ����!7���3 $-�% ����3 $-�& �.��������;�� ����!

����!�����& ��������� ��!������"��������!�����& ��������� ��!������"��������!�����& ��������� ��!������"��������!�����& ��������� ��!������"����

����7����������7�������� ������.$�(�����8)������.$�(�����8)

��& ��������(���������6#�����<�$#��-���& ��������(���������6#�����<�$#��-�/�����6#�����<�$#��-�����& ����7�&/�����6#�����<�$#��-�����& ����7�&

������.$��������.$���� ����7�����(�������.$�7���������7�����(�������.$�7�����

Page 10: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

! ����������-��.��! ����������-��.��

6� ����$�����#���.�#�������=6� ����$�����#���.�#�������=

/���/ �������"�����6�7��'����#�������"�����6�7��'����#�����

�� ��������� �34 ��������'����#������� ��������� �34 ��������'����#������� ��������� �34 ��������'����#������� ��������� �34 ��������'����#�����

�� �������� ��������>#�$�"������.$��>#�$�"������.$��

�����!$'�����!$'���'�������� ����"�������'�������� ����"������

����<��& �����<��& ��� ������.$�������.$�

7�& �����(���������8);���4 ���"���8)7�& �����(���������8);���4 ���"���8)

Page 11: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���� ����

������������� ��������������� ��

�������������������������� ������������������������������ ����

������������������������������������������������

�� ��������� �����!�������� ��������� �����!�������� ��������� �����!�������� ��������� �����!������

������"���#���������"���#���

Page 12: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���������+ �/�� ����#����������+ �/�� ����#�

:�#+���& �����!�������.���:�#+���& �����!�������.����������������$���������������$�������$����������$�������

���+�����& ���������.����#�"�������+�����& ���������.����#�"����

���+��& �������������� �$���$'���""�������������+��& �������������� �$���$'���""������������������"������������.����������������"������������.����������������"������������.����������������"������������.����������

��.?������"��������+����� ����.�����#!���.?������"��������+����� ����.�����#!�

Page 13: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���#���)���*����� �����#���)���*����� ��

���������@�@�& ���.�������������"�������������@�@�& ���.�������������"����

�������#!��"������������������#!��"��������������!������������!�����������

5����������$��5����������$��

% �+���������#���!����� ������% �+���������#���!����� ������% �+���������#���!����� ������% �+���������#���!����� ������

/���!��.�������.�����$��������������/ ���!��.�������.�����$���������������"������"�����"������"����

1���������������!�����'1���������������!�����'

�����������������������������������"#$$'����.$���������������������������"#$$'����.$��������������$���$�()����$���$�()

������������������ �������������������� ����������������������������

Page 14: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

0&����"�%�.�0&����"�%�.�

IDb* interfaces (e.g. IDbConnection)IDb* interfaces (e.g. IDbConnection)

Db* abstract base classes (e.g. DbConnection)Db* abstract base classes (e.g. DbConnection)

ProviderProvider--Independent Independent apps code to apps code to this layerthis layer

Db*Base implementation classesDb*Base implementation classes

SqlSql OleDbOleDb ODBCODBC OracleOracle 33rdrd

Party 1Party 133rdrd

Party 2Party 2

ProviderProvider--specific apps specific apps code to this code to this layerlayer

Page 15: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���#����-�����%���#����-�����%

9�����'� ���$�����������9�����'� ���$���������������������.A��������������.A����

�.��������9����������.��������9����������� �.��������9�����'�.��������9�����'

��������������������������������� ���������������������������������� �

������'��� �������>$6$����-��'��� ����������$�6$����������'��� �������>$6$����-��'��� ����������$�6$����������'��� �������>$6$����-��'��� ����������$�6$����������'��� �������>$6$����-��'��� ����������$�6$����

���.$���.����������������������������������.$���.�������������������������������������������������

6�����# ���������������$$������������6�����# ���������������$$������������

Page 16: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���� ����

������������� ��������������� ��

�������������������������� ������������������������������ ����

������������������������������������������������

�� ��������� �����!�������� ��������� �����!�������� ��������� �����!�������� ��������� �����!������

������"���#���������"���#���

Page 17: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

���������! .&��*&�0��������������! .&��*&�0�����

:�#�����$��������#������������:�#�����$��������#������������

��#��������������� �������#��������������� ����� #$���$������!�� #$���$������!��

����-�����!��������� �������& �����-�����!��������� �������& �����-�����!��������� �������& �����-�����!��������� �������& �

:�#�#���������������������������!����:�#�#���������������������������!����#������������������.����������#������������������.����������

���������������������������#�����������������������������#��������������������������!�����&����!�����&

����� �'�� ��������"�� ��������� �'�� ��������"�� ����

Page 18: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

$�����+ *����$�����+ *����

��& ��#������"���.������!��& ��#������"���.������!

��������/�����1������2��B�'�#�C.����C��2���������/�����1������2��B�'�#�C.����C��2�

� * ����+������ * ����+�����()()

1������������0��#������������������������"���1������������0��#������������������������"�����������������������������'��������������������������'1������������0��#������������������������"���1������������0��#������������������������"�����������������������������'��������������������������'

����$�.�$��'����$�.�$��'

�$���& �����& ������ ���������D�-��$���& �����& ������ ���������D�-�

�$�������$�.$���������$�6$�����$�������$�.$���������$�6$����

Page 19: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

������������&�����������������&�����

6�����!�������� ���$������6�����!�������� ���$������

:�#�������� ����������������'�#�� ���$�:�#�������� ����������������'�#�� ���$�����������

��!����������������!��������������

��������������������"����$��0�����������$��'����������������������������"����$��0�����������$��'�������������������+��!���������$������������+��!���������$������������+��!���������$������������+��!���������$�

��!���0�����.'��� ��#���!���0�����.'��� ��#�

���& �#$��.����������"$#���������������$'�& �����������& �#$��.����������"$#���������������$'�& ��������#����$'��!����������!��#����$'��!����������!��

Page 20: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

�*�������*������

�>$���������'������������������������>#��'��>$���������'������������������������>#��'����#$�����#$��

% �����������A#�������& ��������������% �����������A#�������& ��������������

1#�$����������"��� ��������� �1#�$����������"��� ��������� �� #��'�����"��������� #��'�����"��������� #��'�����"��������� #��'�����"��������

�����!��"��& ����#�������!��"��& ����#��

1�����������������'���������� ���1�����������������'���������� ���

�0��#��������� ����0��#��������� ���

% �+$$�"��������������"��������������!��% �+$$�"��������������"��������������!��

7�>#������� ��������� �����������7�>#������� ��������� �����������

Page 21: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

�������������&�0���������������������&�0��������

:�#���������>$����7������������:�#���������>$����7������������

:�#������������"�� �����������.����:�#������������"�� �����������.���������������& ��$���������!������>$����7����������������& ��$���������!������>$����7�����

�0��#���������>#����������.������0��#���������>#����������.��������������������������������0��#���������>#����������.������0��#���������>#����������.�������������������������������

�0��#����4 ������� �����0��#����4 ������� ����

����'�'�#+$$����������������������������'�'�#+$$������������������������

Page 22: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

! .&��*&� ���#�(�.&�)���! .&��*&� ���#�(�.&�)���

������#������������"��� ��������������#������������"��� ��������

��$'�����������!������ ������$'�����������!������ ��������������������������������

E4 �7�F���$�0�������������������E4 �7�F���$�0�������������������

4 #$���$�����#$�������.��������4 #$���$�����#$�������.��������

6�$$������������$�����"����������������"���� 6�$$������������$�����"����������������"����

�����������#$�������#$���������#����!�����������������$���.�����#����!�����������������$���.�������$����������$�����

7�>#������� ��������� �����������7�>#������� ��������� �����������

Page 23: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

! ����1&0&����-��.��! ����1&0&����-��.��

6� ����$�����#���.�#�������=6� ����$�����#���.�#�������=

�'��� ������������������!�������'��� ������������������!������

��� ���.$������������������� �2�������� ���.$������������������� �2�����

��'�������#���0��#������'�������#���0��#����

1#$�1#$���������������

������������"��$�����"��� ���������������������������"��$�����"��� ���������������

�� ��������� ���& �������'����� ��������� ���& �������'���

/���/ �������"������'���-�34 �-�E �0F��'�����"������'���-�34 �-�E �0F��'���

���������# ����������������# �������

Page 24: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

! ���-��.��! ���-��.��

* �����$����.�#�������=* �����$����.�#�������=

����.�������� ����������'��������.�������� ����������'����

������!������������������������������!������������������������������!������������������������������!������������������������

�$$�"�#��4 ������"�������������#������������$$�"�#��4 ������"�������������#�����������������$$'������$$'����#��������$����������#��������$��������

6���������������!�.#�$���6���������������!�.#�$���

Page 25: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

�.� � ��%�.� � ��%

��������������#���������$����������������#���������$��

1#���������$#�����1#���������$#�����

9#$$�.���& ������� ����.�$��'9#$$�.���& ������� ����.�$��'

G��& ��& �������������9�� �& ���G��& ��& �������������9�� �& ���G��& ��& �������������9�� �& ���G��& ��& �������������9�� �& ���

�����6� �����"�� �& �������$#����������������6� �����"�� �& �������$#�����������

4 ����������"�#���"����� �$�����������4 ����������"�#���"����� �$�����������

���������"���#�������.$�� �����������������"���#�������.$�� ��������

% �+��$������������'�#��"���.���=% �+��$������������'�#��"���.���=

��$�����#���#���!��������"��������$�����#���#���!��������"������

* ���� ��$(���.$����H ������"���� * ���� ��$(���.$����H ������"����

Page 26: new in ado.net 2 · 0& " %˝. IDb* interfaces (e.g. IDbConnection) Db* abstract base classes (e.g. DbConnection) Provider-Independent apps code to this layer Db*Base implementation

Attend a free chat or web castAttend a free chat or web casthttp://www.microsoft.com/communities/chats/default.mspxhttp://www.microsoft.com/communities/chats/default.mspxhttp://www.microsoft.com/usa/webcasts/default.asphttp://www.microsoft.com/usa/webcasts/default.asp

List of newsgroupsList of newsgroupshttp://communities2.microsoft.com/http://communities2.microsoft.com/http://communities2.microsoft.com/http://communities2.microsoft.com/communities/newsgroups/encommunities/newsgroups/en--us/default.aspxus/default.aspx

Microsoft Community SitesMicrosoft Community Siteshttp://www.microsoft.com/communities/default.mspxhttp://www.microsoft.com/communities/default.mspx

Locate Local User GroupsLocate Local User Groupshttp://www.microsoft.com/communities/usergroups/default.mspxhttp://www.microsoft.com/communities/usergroups/default.mspx

Community sitesCommunity siteshttp://www.microsoft.com/communities/related/default.mspxhttp://www.microsoft.com/communities/related/default.mspx