Hello,
if the account number is "abcd" then i need to have to check whether "abcd1" or "abcd2" or ...... is existing or not.
if it is not existing then i need to create it.
so how can i do this
any suggestions
Hello,
if the account number is "abcd" then i need to have to check whether "abcd1" or "abcd2" or ...... is existing or not.
if it is not existing then i need to create it.
so how can i do this
any suggestions
if the account number is a string in the way you are using it the strcat() function would do to change abcd to abcd1 , abcd2 and so on. Then you can search and if the result is null you can create a new account number.
hello see i have an account name abcd already exixting in DB
and i need to get that account number from the DB and then check in a particular location that, that particular file is present or not like abcd1 or2 or 3...
and then suppose if abcd2 is present then it should create a new file by the name abcd3
like this it should go on
now i hope you can help me
I'm no pro, but I would use logic like this:
It's not all inclusive logic, since a HD problem or not enough file handles available, would cause fopen() to return NULL even when such a file did exist, but 99.9% of the time, it does the job.Code:FILE *filePointer; char filename[50]; //a string of char's with your filename, //an end of string char ( '\0'), and no newline char ('\n'). filePointer = fopen(filename, "r"); //now check filePointer and see if a file was opened or not if(filePointer) //file was found else //file was not found (or could not be opened atm)
Last edited by Adak; 09-08-2009 at 05:54 AM.
Could you be a little more vague, please? You use whatever API your database vendor supplies to negotiate queries.hello see i have an account name abcd already exixting in DB
and i need to get that account number from the DB and then check in a particular location that, that particular file is present or not like abcd1 or2 or 3...
and then suppose if abcd2 is present then it should create a new file by the name abcd3
like this it should go on
now i hope you can help me