1 Replies - 8554 Views - Last Post: 17 June 2009 - 09:36 PM Rate Topic: -----

#1 fifz  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 16-June 09

search MS access database using vb.net to display my data from differ

Posted 17 June 2009 - 09:05 PM

how to search MS access database using vb.net to display my data from differ
i have use this code by it not function. i want to search database using a button and a textbox.. but when i insert a column header of my database into the textbox, it can't show me all data from database.

Protected Sub cmdSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSearch.Click

		Dim InputStr As String = txtsearch .Text

		Dim patternStr As String = "([^\.\?\!]*)[(" & Trim(InputStr) & ")][\.\?\!]"

		'For Each FileStr As String In IO.Directory.GetFiles("C:\Documents and Settings\sofi.SHDMNET.000\Desktop\PR1", "*.mdb")
		For Each FileStr As String In IO.Directory.GetFiles("C:\Documents and Settings\sofi.SHDMNET.000\Desktop\PR1\", "*PR INFO.mdb")


			'Can this search rtf? Yep'


			Dim strToSearch As String = IO.File.ReadAllText(FileStr)


			If strToSearch.Contains(InputStr) = True Then

				GetDataItem(Select * from PR INFO ("FEB1 & New RECORD & PreviousPage Reg & PR Reg LAMA & PR&PO REGISTER"))

			End If


		Next

	End Sub



anyone please help me...

This post has been edited by fifz: 17 June 2009 - 09:30 PM


Is This A Good Question/Topic? 0
  • +

Replies To: search MS access database using vb.net to display my data from differ

#2 CamoDeveloper  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 20
  • View blog
  • Posts: 250
  • Joined: 12-June 09

Re: search MS access database using vb.net to display my data from differ

Posted 17 June 2009 - 09:36 PM

I can't help you with the Database question but I notice something in your code. You shouldn't hard code paths into the code. You need to use Server.MapPath()

~Camo
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1