EDB problem

i am Tanvir Ahmed from Bangladesh. i am working to make a finger print based attendance system. i have almost done but i have a problem that i can’t check whether EDB is used or not means i can’t input data dynamically. i can work with one data but not a lot . plz help me…

databaseWithEnroll.ino (5.3 KB)

tanvir12014946:
i can't check whether EDB is used or not means i can't input data dynamically.

What do you mean by that? The example from the EDB library uses "db.appendRec(EDB_REC logEvent);" to add a record to the database and "db.count()" to get the number of records in the database.

sir thank so much for reply . if u look at my program i have used only one record . i want a multiple records . but it doesn't work as it start from begin . as like when one like to enroll, the edb record should automatically increase the "recno" number . in my code i have used for loop but not any condition and my need to add this . ha ha ha ...... but i can't find or create any condition for that if u help me in that purpose than i shall be very happy ............ plz

Use db.appendRec() to add a record to the end of the database.

sir i think you i can’t understand u my problem . i have used the function .
void createRecords(int num_recs)
{
int m = Serial.parseInt();
int d = Serial.parseInt();
Serial.print(“Creating Records…”);
for (int recno = 1; recno <= num_recs; recno++)
{
//int m = Serial.read();
//int d = Serial.read();
logEvent.id = userid;
sprintf(logEvent.date, “16-%02d-%02d”, m, d);
logEvent.roll = Serial.parseInt();
logEvent.present = Present;
EDB_Status result = db.appendRec(EDB_REC logEvent);
if (result != EDB_OK) printError(result);
}
Serial.println(“DONE”);
}
but this one automatically increases . i want a intentional break .

I'm sorry. The language barrier seems to be too great. Perhaps one of the forums under International would have people who could help in your native language.

sir i am from Bangladesh. i am in great problem . sir i just want to know how can i check whether recno number is used or not .

i just want to know how can i check whether recno number is used or not .

You typed the code. The recno variable is used to control the for loop. You can look at the body of the for loop to see if YOU used recno anywhere in the body. (I don't see anywhere where it is used.)

yes i know that sir . but my problem is it automatically count how much record number i have entered means the number of db.count(). but i want it increase like that one enrolls and give his information . okay then then next one comes and he likes to registry , when he goes for registry he will see one record there so he has to go for next address where he can saved his data . like this

bool usedid = true;
while (usedid == true)
{
usedid = fps.CheckEnrolled(enrollid);
if (usedid==true) enrollid++;
}
but fps.CheckEnrolled(enrollid) is a part of #include "FPS_GT511C3" . i just want to know does edb have such kind of Boolean function which return true if edb address is not used and false if edb is used ?

i just want to know does edb have such kind of Boolean function which return true if edb address is not used and false if edb is used ?

The class is pretending to be a database. One can query a database to see if a record exists.

thank u so much sir ................. can u say how can i do this ?

thanks so much sir johnwasser and sir PaulS . i find a way to solve it . without yours help it may not be possible . never give up… ha ha ha ha … yahoo

sir is the edb is volatile ? . when i have powered off, i can't find the records.

is the edb is volatile ?

Yes, it is.

when i have powered off, i can’t find the records.

I presume you mean that “after you have powered it off, and back on”, you can’t find any records. This would be true. Of course you can’t find any records when the device is powered off. Even if the records were persistent, you couldn’t find them when the device is powered off.

oh no !!!!!!!!!!!!!!