Looking for change password in iphone application sdk using sqlite

Ads
 

Looking for change password in iphone application sdk using sqlite

i am trying to change old password in my iphone application my code is below please help how can i do ....

-(IBAction)matchpassword{ //sqlite3_stmt *updateStmt; sqlite3 *database; const char *dbpath = [databasePath UTF8String]; sqlite3_stmt *statement;

if (sqlite3_open(dbpath, &database) == SQLITE_OK)
{
    NSString *querySQL = [NSString stringWithFormat: @"SELECT password FROM password WHERE password=\"%@\"", txtOldPass.text];

    const char *query_stmt = [querySQL UTF8String];

    if (sqlite3_prepare_v2(database, query_stmt, -1, &statement, NULL) == SQLITE_OK)
    {
        if (sqlite3_step(statement) == SQLITE_ROW)
        {
            NSString *addressField = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 0)];
            if(updatepass == nil){
                if([txtNewPass.text isEqualToString:txtConfPass.text]){
                    const char *sql ="update password Set password = ? Where pk = ?";

                    if(sqlite3_prepare_v2(database, sql, -1, &updatepass, NULL)!=SQLITE_OK)
                        NSAssert1(0,@"Error while creating update statement. '%s'.",sqlite3_errmsg(database));
                }

            //  Globle *objupdate = [[Globle alloc]initWithPK:0];
            //  objupdate.pass =[[NSString stringWithUTF8String:(char *)sqlite3_column_text(updatepass, 1)]retain];
                //pass = [[NSString stringWithUTF8String:(char *)sqlite3_column_text(login, 1)]retain];
                sqlite3_bind_text(updatepass, 1, [pass UTF8String], -1, SQLITE_TRANSIENT);
                sqlite3_bind_int(updatepass, 2, pk);



                if(SQLITE_DONE != sqlite3_step(updatepass)){
                    NSAssert1(0,@"error while updating  '%s'",sqlite3_errmsg(database));
                }
                else{
                    sqlite3_last_insert_rowid(database);
                }
                sqlite3_reset(updatepass);
                sqlite3_finalize(updatepass);
                [objectToEdit setValue:txtOldPass forKey:self.keyOfTheFieldToEdit];
                passwordViewController *FBController = [[passwordViewController alloc] initWithNibName:@"passwordViewController" bundle:nil];
                [self.view addSubview:FBController.view]; 

            }
            txtOldPass.text = addressField;
            status.text = @"Match found";
            [addressField release];
        }
        else 
        {
            //status.text = @"Match not found";
            txtOldPass.text = @"";
            //phone.text = @"";
            UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"UIAlertView" message:@"Wrong username or password" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil];
            [alert show];
            [alert release];

        }
        sqlite3_finalize(statement);
    }
    sqlite3_close(database);
}

}

View Answers

Ads









Related Tutorials/Questions & Answers:
Looking for change password in iphone application sdk using sqlite
Looking for change password in iphone application sdk using sqlite  i am trying to change old password in my iphone application my code is below...) == SQLITE_OK) { NSString *querySQL = [NSString stringWithFormat: @"SELECT password
How to Changing Toolbar Color using iPhone Application ?
How to Changing Toolbar Color using iPhone Application ?  Hi, i have developing a small application to changing the toolbar color in iphone. But i... the online reference or example of how to change toolbar color in iPhone Apps
Advertisements
How to Create Quiz Application using iPhone
How to Create Quiz Application using iPhone  Hi, I am learning iphone application Programming Language. my question is that how to create a quiz application using iPhone. Please provide online reference to study and example
password change
password change  Hi , I am using jsf and trying to write a code to change the password of a user . Ihave to retrine userid fromdata base how to do that using session
Change root password of MYSQL using Java
Change root password of MYSQL using Java In this tutorial, you will learn how to change the root password of MYSQL database using java code. For every..., the system administrator user is called root. You can also set the new password using
change password
change password  how to change password in the login form.... by giving options to user like this old password, new password.. pls help
iphone handle orientation change
iphone handle orientation change   How can i handle the orientation change in iPhone / iPad application? Please suggest. Thank in Advance
iPhone Mobile Application Development
is now eager to offer iPhone mobile application development using the released Apple iPhone Software Development Kit (SDK) and Mac machine. Ever since...iPhone Mobile Application Development. Roseindia Technologies with over eight
change kerberos principal password
change kerberos principal password  How to change the password... on the console and enter admin password. then you can use following command to change password: change_password abcd/mydomain.com It will ask for new
iPhone Application Development,Mobile iPhone Application Development,iPhone Porting Solutions
iPhone Application Development Services Rose India iPhone Application.... The introduction of iPhone marked a new beginning in the mobile application... process for developing native iPhone applications using
iPhone, iPhone Application Development services from Rose India Technologies.
application development using the released Apple iPhone Software Development Kit (SDK) and Mac machine. Offshore iPhone Development With the evolution...iPhone Application Development and Support iPhone Mobile Application
How to change password mask field?
How to change password mask field?  I want to use '*' character in password. thanks in advanced............   password masking character in the standard password field can't be changed
Login Password Validation iPhone / iPAD
Login Password Validation iPhone / iPAD  HOW TO WRITE A TEST CASE TO SET THE VALIDATION FOR LOGIN AND PASSWORD FIELD IN OBJECTIVE C, IOS.   ...]; //unless you're using ARC } @end   WHAT IS "STAssertTrue
Forgot Password of Application
Forgot Password of Application  Forgot Password of Application through servlet and jsp
iPhone application designer
iPhone application designer We have designed many applications for iPad and iPhone. We are expert iPhone application designer in the field of mobile application designing. If you are looking for iPhone application designer, look
What is iPhone SDK?
What is iPhone SDK?       What is iPhone SDK? The iPhone SDK or iPhone software... and build the software for the iPhone. The iPhone SDK includes the API and components
iPhone Application Development Company in India
of application. If you are looking for iPhone Application Development Company in India... iPhone Application Development Company in India We are highly experienced iPhone Application Development Company in India offering high
iPhone Application Development Company in India
of application. If you are looking for iPhone Application Development Company in India... iPhone Application Development Company in India We are highly experienced iPhone Application Development Company in India offering high
iPhone Application Development Company in India
of application. If you are looking for iPhone Application Development Company in India... iPhone Application Development Company in India We are highly experienced iPhone Application Development Company in India offering high
Forgot Password of Application
Forgot Password of Application  i want sample code for Forgot Password of Application
Iphone Current Date Application
Iphone Current Date Application  Hi, I am a beginner in the mobile web application segment. How can i develop Iphone Current Date Application. I need the online help guide or example about iphone current date format. Thanks
Setting a Background image for UITableView in iPhone & iPad application.
Setting a Background image for UITableView in iPhone & iPad application.  in my iPhone application i am using a simple UITableView to show the listing. But the it looks very simple.. (white color). Though i can change
Iphone Table View Application
Iphone Table View Application  Hi, How to use Table View Application in Iphone? What parameters i have to follow to develop the Table view Apps with iphone? Please guide me or suggest any online example for reference. Thanks
ModuleNotFoundError: No module named 'flask-change-password'
ModuleNotFoundError: No module named 'flask-change-password'  Hi...: No module named 'flask-change-password' How to remove the ModuleNotFoundError: No module named 'flask-change-password' error? Thanks   Hi
ModuleNotFoundError: No module named 'flask-change-password'
ModuleNotFoundError: No module named 'flask-change-password'  Hi...: No module named 'flask-change-password' How to remove the ModuleNotFoundError: No module named 'flask-change-password' error? Thanks   Hi
How to Make iPhone Window Application
How to Make iPhone Window Application  Hi, For Making iphone window application, what parameters i have to follow or provide example related to iphone window application. Thanks
How to Create Segment Application with iPhone
How to Create Segment Application with iPhone  Hi, i am fresher in iphone application. How can i will create segment application in iphone. So, kindly help me or provide online example reference. Thanks
Looking for sample project in java using netbeans
Looking for sample project in java using netbeans  Hi all, i am novice in developing desktop application in java using netbeans. can anyone pls help me by sending project built in netbeans as soon as possible. so that i could
Database in iPhone Application
Database in iPhone Application  I am a beginner in iphone development. I would like to know how to create a database for an Iphone App. My issue is that I am trying to do a Restaurant App for which i think a DB has
iPhone Application Development
be developed using a variety of tools like Apple's free iPhone SDK development tool... supports both resident and web application development. The iPhone SDK Instruments enables application code tracing and profiling. The iPhone SDK can be used
iPhone & iPad application development
iPhone & iPad application development We are leading company for iPhone & iPad application development and support. Our team is expert in iPhone... convert your application idea into fully functional iPhone and iPad applications

Ads