Looking for change password in iphone application sdk using sqlite

Ads

 
 

Share on Google+Share on Google+

Nitin Gohel
Looking for change password in iphone application sdk using sqlite
0 Answer(s)      5 years and 11 months ago
Posted in : MobileApplications

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);
}

}

Ads
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
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
Advertisements
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
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
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
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
iphone handle orientation change
iphone handle orientation change   How can i handle the orientation change in iPhone / iPad application? Please suggest. Thank in Advance
change password - JSP-Servlet
change password  hi, my problem is as follows: i am creating a simple web application using mysql and jsp. now i want to create a web page for a user. this web page consists of changing the password for the existing user
Change Password - JSP-Servlet
Change Password  Hi all, Please kindly help me with jsp code and explanations to enable me write a change password program. This program will connect to mssql database 2000. Thanks
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
iPhone TabBar Application Tutorial - UITabBar
iPhone TabBar Application Tutorial - UITabBar The basic idea behind using... is UIKit.framework. In iPhone application, you can create your own customize Tab Bar application... designed for the new comers to the iPhone application development. The tutorial
SQLite
SQLite  Hi, What is SQLite? Provide me some example code for storing the data in SQLite database. Thanks   Hi, SQLite is relational database. It is an ACID-compliant embedded RDBMS system. Thanks
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
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
Forgot Password of Application
Forgot Password of Application  Forgot Password of Application through servlet and jsp
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
Forgot Password of Application
Forgot Password of Application  i want sample code for Forgot Password of Application
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
Change Button Text iPhone
Change Button Text iPhone In a UINavigationController based application, most.... But luckily we can change the button text in iPhone app. Find the given code that will change the text on the back button. You can also give it a Title of your
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
Max size of iPhone application
Max size of iPhone application  Hi, I am developing iPhone application. There are many images and videos. I want to know allowed max size in MB. What is the max size of iphone application? Thanks   Hi, I think
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
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
Forgot Password Screen of Application
Forgot Password Screen of Application       Forgot Password Screen our web application allows the user, to request for their forgotten password. Program sends the password
change password servlets - JSP-Interview Questions
change password servlets  hi all, i need the codes to create a change... a link for change the password page in that page there should be a three text box... you.  Hi friend, i am sending a code to change password by servlet
Change Password Code in JSP
Change Password Code in JSP In this example we will see how to change password...(""); ChangePasswordForm.jsp <html> <head> <title>Change password in jsp<...;strong>Change password in JSP form</strong></h2> <body> <
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
how to change password into one jsp to another jsp
how to change password into one jsp to another jsp  i have two jsps in one jsp i give one password and confirm password, in another jsp i want change...; Here is a jsp code that change the password. 1)change.jsp: <html>
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
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

Ads

 
Advertisement null

Ads