求助!!!!!!!!!!!ERROR [IM002] [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
&&&&&&&&下面的代码是我用visual studio 2005 编写的,一运行就会出现“ERROR [IM002] [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序 ”这个问题,我用的数据库是access 2000.请大家帮帮小弟的忙。谢谢!谢谢!
<%@ Page Language= "C# " ContentType= "txet/html "AutoEventWireup= "true " CodeFile= "OleDbConnection.aspx.cs " Inherits= "_Default " %>
<%@ Import Namespace = "System.Data " %>
<%@ Import Namespace = "System.Data.Odbc " %>
<script language= "c# " runat = "server ">
public OdbcConnection AconnStr;
void Page_Load(Object sender,EventArgs e){
string Afile = Server.MapPath( "App_Data/User.mdb ");
OdbcConnection AconnStr= new OdbcConnection ( "Driver={Microsoft Access Driver(*.mdb)};Dbq= "+Afile+ "; ");
Response.Write(AconnStr);
OdbcCommand Acmd= new OdbcCommand( "select * from UserName order by ID ", AconnStr);
Response.Write(Acmd);
OdbcDataReader odr = null;
AconnStr.Open();
try
{
odr = Acmd.ExecuteReader();
}
catch (Exception ex)
{
if (ex != null) Response.Write(ex.ToString());
}
if (odr != null)
{
string TotalInfo = " ";
while (odr.Read())
{
TotalInfo += odr[ "ID "].ToString() + " " + odr[ "UserName "].ToString() + " <br/> ";
&n