Access数据库的连接(ADO.NET)

<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
Imports System.Data.OleDb
Module Module1
    Sub Main()
     ' 首先设置对 System.Data.dll 的引用。
     Dim objConn As New OleDbConnection _
     ("Provider=Microsoft.Jet.OLEDB.4.0;" & _
     "User ID=Admin;" & _
     "Data Source=C:/Northwind.mdb")
     objConn.Open()
     Dim objCmd As New OleDbCommand _
     ("SELECT * FROM Products", objConn)
     Dim objDataReader As OleDbDataReader = objCmd.ExecuteReader
     objDataReader.Read()
     Console.Write(objDataReader.Item("ProductName") & ", " & _
     objDataReader.Item("UnitsInStock"))
    End Sub
End Module
11AJ1S621025133.jpg
seover="window.status='正文--Access数据库连接(ADO.NET)';return true">
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
阅读更多
个人分类: .net
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭