Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Mobile-Applications Looking for change password in iphone application sdk using sqlite
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nitin Gohel
Looking for change password in iphone application sdk using sqlite
0 Answer(s)      2 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);
}

}


Advertisement
View Answers

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
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
Advertisements
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
what is json in iphone sdk
what is json in iphone sdk  What is json in iphone sdk? Is this a library and when i need to include JSon in my iPhone SDK App
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 sdk-objective c
iphone sdk-objective c  how to delete random value which is got from the random function in an array
Iphone SDK Development
Iphone SDK Development  Hi, I am a beginner in the Mobile applications platform. From where i get the online help or information related to Iphone SDK Development Apps help. Please provides me reference sites.. Thanks
iPhone SDK UIAlertView
iPhone SDK UIAlertView  Hi, How can i use the iPhone UIAlertView to create a message box. Can any help or provide example or online reference. Thanks
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
activity indicator for iphone sdk
activity indicator for iphone sdk  Setting the UIActivity indicator in search bar for iPhone SDK.   [NSThread detachNewThreadSelector:@selector(threadStartAnimating:) toTarget:self withObject:nil];   -(void
Page curl effect iPhone SDK
Page curl effect iPhone SDK  How to get the page curl effect in my iPhone application? Please suggest or give an example to get the page curl effect in iPhone SDK application. Thanks.   In objective c there is a method
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 SDK Examples
. are presented here. We will discuss all the UI and other components of the iPhone SDK... Debugging Audio and many more tips and tricks of iPhone application...While developing the iPhone program, many times you need some code to copy
iPhone SDK Multiple UIButton
iPhone SDK Multiple UIButton  In my iphone SDK program.. i wanted... into database. Any help is appreciated. Thanks in Advance!   iPhone SDK...:myButton]; iPhone SDK Creating Multiple UIButton for (int row = 0; row<4
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
share data iphone sdk
share data iphone sdk  How to share data in iPhone application? Actually i want the sharing feature in my iPhone application. Thanks!   You can use the emailing feature in your iPhone application to the share data
iPhone Capturing Screen SDK
iPhone Capturing Screen SDK  Creating an application to capture the screen shots from iPhone. In objective c is there any class that make it enable..?   UIGraphicsBeginImageContext(CGSizeMake(480,320)); UIImage* result
Hyperlink on UILabel iPhone SDK
Hyperlink on UILabel iPhone SDK  Hi, I wanted to set a hyperlink on UILabel in my iPhone application. Can anyone suggest me how to do it? Thanks
implement core data iphone sdk
implement core data iphone sdk  How to implement core data in iPhone SDK? Please Help
parse url iphone sdk
parse url iphone sdk  How can i parse two different URL's using NSXMLParser
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 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
iPhone SDK Tutorials and Examples
developed to learn iPhone SDK programming easily. These iPhone SDK tutorials... we will explain you the iPhone SDK programming concepts in detail. You... the iPhone applications using Xcode IDE. This iPhone Development tutorial
iphone handle orientation change
iphone handle orientation change   How can i handle the orientation change in iPhone / iPad application? Please suggest. Thank in Advance
Installing iPhone SDK
Downloading and Installing iPhone SDK?       Downloading SDK for iPhone.... The Apple's SDK enables the programmers to develop software for iPhone
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
iPhone 3.0 SDK
iPhone 3.0 SDK delivers on its Promise  ... release is the beta version of the third iPhone SDK. The iPhone 3.0 SDK beta allows... the application previously from the iPhone Store. There is more good news
license for google maps - iPhone SDK
license for google maps - iPhone SDK  Do i need a license to display the locations on google map in my iPhone application
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
How to open URL in iPhone SDK
How to open URL in iPhone SDK  In my iPhone application ..i wanted to open a url in the application. Is it possible? If yes how will i come back to my application
space between buttons iPhone SDK
space between buttons iPhone SDK  Hi, can any one please explain how to add space between UIButtons in iPhone SDK. Actually i am creating Multiple UIButton's and added them to my UIScrollView. But problem is that those buttons
Advertisements
 

 

 

DMCA.com