|
-
Jan 8th, 2009, 12:05 PM
#1
Thread Starter
Addicted Member
search method
hello,
i am making a project using search method, i am using a textbox for inputing the codenumber and 2 lblboxes for showing me the product name and the product price, how can i array this and what method should i use? i am using a DB in access2000 and how can i access the fields that being set? tnx....
-
Jan 8th, 2009, 12:19 PM
#2
Re: search method
Do you already know how to access a database? You could execute an sql against the database if that is what you want.
-
Jan 8th, 2009, 12:24 PM
#3
Thread Starter
Addicted Member
Re: search method
nope, can you tell me what sql statement should i use, and i know how to access a DB, it is on the properties of the data grid? right?
-
Jan 8th, 2009, 01:33 PM
#4
Re: search method
No datagrid involved. Just a straight SQL SELECT statement
Code:
SELECT product_name, product_price FROM yourtable
WHERE product_code = '" & txtproductcode.text & "' "
Naturally you have to change the field names and textbox name to reflect what you are actually using. Also, if the product code is stored as a numeric you do not need the single quotes.
-
Jan 9th, 2009, 04:06 PM
#5
Thread Starter
Addicted Member
Re: search method
tnx for your reply guys, it did work... one more question, how do you use a searchstring? i am totally confused on this feature...
-
Jan 9th, 2009, 05:36 PM
#6
Re: search method
What do you mean by searchstring?
-
Jan 11th, 2009, 03:22 AM
#7
Thread Starter
Addicted Member
Re: search method
for example i want to search a DB for a certain string, i guess it goes like this search$ from this column from cell1 to cell10, how do i express it in code?, tnx....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|