Hi guys,
Im currently doing my Final Year Project on electronic engineering course..And my project relates to RFID and sadly to say it is due by next week:sad: Im using vb6 and I DESPERATELY need help on one part of my code....Can anybody help???

But first of all, I want to say my project is about showing video trailer...Lets say a RFID tag attached to a DVD Cover put near the RFID Reader it will detect rite?:cheesy: But when a person took away the DVD, the screen will display the video trailer according to its title...Can anybody help me??? I can attach the code however you might not be able to run it cos you dont have the driver

Just give me the code of what you think is correct...

I know you already have a reply, but I'll stick my 2 cents in anyway.

Your basic logic progression is to have the buyer select the criteria by which to search the houses offered, then search the house list and compile an additional list of properties which fit the buyer's criteria. The problem with your original code is that the do-while loop includes the input string for each criteria choice, and it will reiterate those input queries for every record in the file. I didn't count how many there were in your sample file, but it looked like well over 100.

Here's what I would have done. I would first get the customer's criteria, then open the house file for input and compare each listing to the customer's criteria. I would put each bit of info from each listing that met the criteria into arrays. The arrays could then either be printed to paper, screen, or to another text file. My code would look something like this:

(I have not plugged the code in to test it, since this is just to give you a new approach to the problem.)


'Ananda Bennett
'11/06/2006
'HHSS


dim counter(1) 'counter variable for array use

'the following are arrays for building the buyer's choice list

dim buyer_bed (10000)
dim buyer_bath(10000)
dim buyer_price(10000)
dim buyer_address$(10000)
dim buyer_city$(10000)
dim buyer_state$(10000)
dim buyer_proptype$(10000)

'Code Starts here --------------------------------------------------------

counter = 0

OPEN "c:\homes.txt" FOR INPUT AS #1

PRINT"************************************"
PRINT"* 1 - Search by number of bedrooms *"
PRINT"* 2 - Search by number of bathrooms*"
PRINT"* 3 - Search by price *"
PRINT"************************************"

INPUT "What would you like to search for homes by?: "; schoice
SELECT CASE schoice

CASE 1
INPUT "How many bedrooms would you like to search by?; "; bedquant

DO WHILE EOF(#1) <> -1
INPUT #1, address$, city$, state$, proptype$, bedrooms, bathroom, price

IF bedquant = bedroom THEN

counter = counter + 1 'increment counter for array
buyer_bed (counter) = bedrooms
buyer_bath(counter) = bathroom
buyer_price(counter) = price
buyer_address$(counter) = address$
buyer_city$(counter) = city$
buyer_state$(counter) = state$
buyer_proptype$(counter) = proptype$

END IF
LOOP

CASE 2
INPUT "How many bathrooms would you like to search by?; "; bathquant

DO WHILE EOF(#1) <> -1
INPUT #1, address$, city$, state$, proptype$, bedrooms, bathroom, price

IF bathquant = bedroom THEN

counter = counter + 1 'increment counter for array
buyer_bed (counter) = bedrooms
buyer_bath(counter) = bathroom
buyer_price(counter) = price
buyer_address$(counter) = address$
buyer_city$(counter) = city$
buyer_state$(counter) = state$
buyer_proptype$(counter) = proptype$

END IF
LOOP

CASE 3
INPUT "What price would you like to search by?; "; prices

DO WHILE EOF(#1) <> -1
INPUT #1, address$, city$, state$, proptype$, bedrooms, bathroom, price

IF prices = price THEN

counter = counter + 1 'increment counter for array
buyer_bed (counter) = bedrooms
buyer_bath(counter) = bathroom
buyer_price(counter) = price
buyer_address$(counter) = address$
buyer_city$(counter) = city$
buyer_state$(counter) = state$
buyer_proptype$(counter) = proptype$

END IF
LOOP

END SELECT

CLOSE #1

for x = 1 to counter
PRINT "Address: "; address$
PRINT "City: "; city$
PRINT "State: "; state$
PRINT "Prop. Type: "; proptype$
PRINT "Bedrooms: "; bedrooms; "Bathrooms: "; bathrooms; "Price: "; price
print""
next x

Please ignore that post, I accidentally posted a reply to a different thread in your thread.

[Hey 1g0r,
I am working on a similar RFID project in which when the transponder comes in the field of the reader, the transponder's TAG ID is tramsmitted over to the Reader which is linked to a microcontroller and the TAG ID is checked against the EEPROM of the microcontroller. I need to build a PC interface which transfers the tag id to the computer where it can be properly associated to a user name using a GUI. I looked at you code and tried to make sense out of it. Can you give me your project specifications so I may have better idea about it? What does your project exactly do?

This article has been dead for over six months. Start a new discussion instead.