先看一下Access的连接数据库并打开:
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
下面再看一下SQL SERVER的连接数据库并打开:
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
实际上,在大多数地方SQL SERVER和ACCESS的区别除了连接语句,其他定义语句也就是SQL××和OLEDB××的区别
另外,如果是ACCESS数据库的话在ASPX文件的开头需要包括下列语句:
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
如果是SQL SERVER则需要包括以下语句:
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.SqlClient"%>