Ciao a tutti, ho un problema con una pagina ASP.NET.
Sto cercando di creare una DataList che mi mostri a video il risultato di una SELECT.
Il problema è sul FILL della tabella.
Io ho Internet Explorer 6.0 SP1 con il Framework.NET SP2
CODICE:
--------------------------------
<%@ import Namespace="System.Data.OleDB" %>
<%@ import Namespace="System.Data" %>
<script language="VB" runat="server">
sub Page_Load(obj as Object, e as EventArgs)
dim nome_da_ricercare
nome_da_ricercare = request.form("Nome")
'connection setup
dim objConn as new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0; DataSource=E:\Documenti Luca\ACCESS\Numeri-Telefonici\Numeri.mdb")
'connection open
dim sql_select
sql_select = "SELECT * FROM Numeri WHERE Nome Like '%" & nome_da_ricercare & "%' "
dim objCmd as new OleDbDataAdapter (sql_select, objConn)
'Dataset Creation
dim DS as DataSet = new DataSet()
objCmd.Fill(DS,"Numeri")
Griglia.DataSource = DS.Tables("Numeri").DefaultView
Griglia.DataBind()
end sub
</script>
<html>
<body>
<aspataList id="Griglia" RepeatColumns="2" RepeatDirection="Vertical" runat="server">
</aspataList>
</body>
</html>
ERRORE:
------------------
Server Error in '/ASP.NET' Application.
--------------------------------------------------------------------------------
Could not find installable ISAM.
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: Could not find installable ISAM.
Source Error:
Line 16: 'Dataset Creation
Line 17: dim DS as DataSet = new DataSet()
Line 18: objCmd.Fill(DS,"Numeri")
Line 19:
Line 20: Griglia.DataSource = DS.Tables("Numeri").DefaultView
Source File: C:\Inetpub\wwwroot\ASP.NET\Telefono\Risultati_Tele fono.aspx Line: 18
Stack Trace:
[OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +131
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +98
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ASP.Risultati_Telefono_aspx.Page_Load(Object obj, EventArgs e) in C:\Inetpub\wwwroot\ASP.NET\Telefono\Risultati_Tele fono.aspx:18
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.288; ASP.NET Version:1.0.3705.288
Grazie a tutti.