Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Line 15: End Sub Line 16: Line 17: IDataReader r command.ExecuteReader("SELECT * FROM Vare WHERE tekst LIKE '% "+ word +"%'"); Line 18: Line 19: ArrayList arr = new ArrayList();
Compiler Error Message: BC30684: 'IDataReader' is a type and cannot be used as an expression.
Source Error:
Line 18: Line 19: Sub BtnSog_Click(sender As Object, e As EventArgs) Line 20: IDataReader = r command.ExecuteReader("SELECT * FROM Vare WHERE tekst LIKE '% "+ word +"%'"); Line 21: Line 22: ArrayList arr = new ArrayList();
Dim strConn As String Dim objConn As OleDbConnection Dim objComm As OleDbCommand Dim objDataReader As OleDbDataReader
Sub Page_Load() strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.Mappath("db/Hammerslag.mdb") & ";" objConn = New OleDbConnection(strConn)
End Sub
Sub BtnSog_Click(sender As Object, e As EventArgs) IDataReader = r command.ExecuteReader("SELECT * FROM Vare WHERE tekst LIKE '% "+ word +"%'");
ArrayList arr = new ArrayList(); while (r.Read()) { arr.Add(r.GetString(0)); } r.Close();
string[] words = new string[arr.Length]; arr.CopyTo(words); return words;
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30684: 'IDataReader' is a type and cannot be used as an expression.
Source Error:
Line 18: Line 19: Sub BtnSog_Click(sender As Object, e As EventArgs) Line 20: IDataReader r = command.ExecuteReader("SELECT * FROM Vare WHERE tekst LIKE '% "+ word +"%'"); Line 21: Line 22: ArrayList arr = new ArrayList();
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.