|
主题: 请教----数据库联接问题
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#12003/5/21 11:08:00
我学习写数据库联接程序,但是老是报出错,我直接改写了范例数据库,又是可以的,我不知道哪里出错了,请各位帮忙我找出问题,谢谢.
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#22003/5/21 11:12:01
以下为我写的程序 ================== <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> 无标题文档
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#32003/5/21 11:12:49
以下为范例程序 ================== <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> 戈畐隔畖: Connection - DataAdapter - DataSet - DataGrid
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#42003/5/21 11:14:43
以下为我的程序在IE中的出错信息
=================== Server Error in '/prac' Application. --------------------------------------------------------------------------------
No error information available: REGDB_E_CLASSNOTREG(0x80040154). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[OleDbException (0x80040154): No error information available: REGDB_E_CLASSNOTREG(0x80040154).]
[InvalidOperationException: The 'Miscrosoft.Jet.OLEDB.4.0' provider is not registered on the local machine.] System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81 System.Data.OleDb.OleDbConnection.CreateProvider() +97 System.Data.OleDb.OleDbConnection.Open() +107 ASP._1_aspx.Page_Load(Object sender, EventArgs e) +113 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +29 System.Web.UI.Page.ProcessRequestMain() +724
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#52003/5/21 11:17:44
这样说的很详细了吧,屏幕这么长.今天搞了一上午,写了N次,都找不到哪出错.请各位多多指点.
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#62003/5/21 11:19:12
我的db1.mdb是用access2002写的,难道版本不对,不可能呀,范例明明是可以的.
|
 namelysweet
职务:普通成员
等级:3
金币:1.0
发贴:681
|
|
 namelysweet
职务:普通成员
等级:3
金币:1.0
发贴:681
|
#82003/5/21 13:24:37
Dim SQL="Select*Form 产品1"
是From 而不是FORM!! :p
编辑历史:[这消息被namelysweet编辑过(编辑时间2003-05-21 13:25:31)] [这消息被namelysweet编辑过(编辑时间2003-05-21 13:36:04)]
|
 zt
职务:普通成员
等级:1
金币:1.0
发贴:229
|
#92003/5/21 13:35:18
oh,my god ,吐血。。。。。 无语。。。石化ing 多谢指教。在下初学,请以后多多指点
|