Jump to content

DaveMason

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by DaveMason

  1. Thanks for the quick reply.Well, what I'm trying to do is search the reocrd and if it matches the criteria, display the word and definition. that's about it. I'm still unable to get it to work correctly. Is there a new apporach to do it?thanks again.

  2. Hello! I'm new to this. This is my first program. I'm trying to search a database and then display a simple result on the same page. Here is what I have done so far. Thanks for help. Note: I'm using NotePad to write my ASP.NET code.<%@ Import Namespace="System.Data.OleDb" %><script runat="server">Sub Search(send As Object, e As EventArgs)dim txtInputdim dbconn, sql, dbcomm, dbreadtxtInput=txtSearch.Textdbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & Server.MapPath("db1.mdb"))dbconn.Open()sql = "SELECT * FROM dictionary WHERE Word Like '*" & txtInput & "*'; "dbcomm=New OleDbCommand(sql,dbconn)dbread=dbcomm.ExecuteReader()dictionary.DataSource=dbreaddictionary.DataBind()dbread.Close()dbread.Close()End Sub</script><html><body><form id="Form1" runat="server"><asp:TextBox id="txtSearch" runat="server" /><asp:Label ID="txtOutPut" runat="server" /><asp:Button ID="Button1" text="Search" OnClick="Search" runat="server" /></body></html>

×
×
  • Create New...