我正在尝试在经典ASP中构建一个数据网格。我在这里和那里阅读了一些文章,并尝试使用 MSDataShape 来实现这一点。
我从未使用过MSDataShape,所以完全不知道它。
'Create the ADO Connection object.
set oCon = Server.CreateObject("ADODB.Connection")
'--- Generate the connection string
sCon = "Data Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;"
sCon = sCon & "Data Source=" & Server.MapPath("Northwind.mdb")
oCon.ConnectionString = sCon
'--- Specify that we will use the Data Shaping provider.
oCon.Provider = "MSDataShape"
'--- Open the connection
oCon.Open
我收到以下错误:
Microsoft OLE DB 服务组件错误"80040154"类不是 注册/DG/测试.asp,第 39 行 –
错误消息指示找不到指定的数据提供程序。在这种情况下,3.51 是一个非常旧的 Jet 版本。尝试使用以下方法:
sCon = "Data Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"
此外,如果使用的是 64 位操作系统,请确保将应用程序池配置为在 32 位模式下运行。