Search form for imported database in visual basic.

Reply

Join Date: Dec 2007
Posts: 1
Reputation: bogdan1sucku is an unknown quantity at this point 
Solved Threads: 0
bogdan1sucku bogdan1sucku is offline Offline
Newbie Poster

Search form for imported database in visual basic.

 
0
  #1
Dec 19th, 2007
Hello,
I'm having a bit of a problem building a search form in my visual basic database.
I tried (LIKE @Column + '%') or ('*'). No use because its not showing me the text box in wich i can actually search.
I think i'm having this problem because i've imported the database from Access and the columns are not declared in Visual Basic.
Can i build a diffrent search form? ( Text box + button or smthg... )

I appreciate any kind of help!

Thank You,
Andres Bogdan.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 119
Reputation: agrothe is an unknown quantity at this point 
Solved Threads: 14
agrothe's Avatar
agrothe agrothe is offline Offline
Junior Poster

Re: Search form for imported database in visual basic.

 
0
  #2
Dec 19th, 2007
Ok, first off, is the database connection working? What technology are you using for database connectivity? DAO or ADO?

You build your query by including a text box value in the query string and then send the query via recordset or command object to the database.

So if you have a text box called txtSearch,

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. dim qry as string
  2. qry = "Select * from sometable WHERE somecolumn LIKE '%" & txtSearch & "%' ORDER BY somecolumn ASC;"

Pass that to your database to receive the information back...
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC