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



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

Have Programming Question? Ask it here!
 
 
 


Nitin Gohel
Looking for change password in iphone application sdk using sqlite
0 Answer(s)      2 years and 9 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
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
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
iphone sdk-objective c
iphone sdk-objective c  how to delete random value which is got from the random function in an array
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 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
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
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 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
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 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
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
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 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
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
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
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
rate my app iphone SDK
rate my app iphone SDK  How can i enable "Rate and Review Application" feature of my application on iTune
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
add plist file iphone sdk
add plist file iphone sdk  how to add plist file in XCode
add plist file iphone sdk
add plist file iphone sdk  how to add plist file in XCode
How do SEL and @selector work in iphone sdk?
How do SEL and @selector work in iphone sdk?  How do SEL and @selector work in iphone sdk?   SEL is a type that represents a selector in Objective-C. The @selector() keyword returns a SEL that you describe
go back to previous view iphone sdk
go back to previous view iphone sdk  How to go back to previous view iphone sdk?    - (IBAction)backView:(id)sender { [self.navigationController popViewControllerAnimated:YES
remove from superview iphone sdk
remove from superview iphone sdk  How to remove the old view from super-view and add the new view safely? My main concern is memory leak.. so, please suggest how can i do it without facing a memory leak. Thanks
Current Date iPhone SDK
Current Date iPhone SDK In this example, you'll find out how to get current date & day in iPhone SDK. We'll also write a method to print the day and date...! If not lets first find out what is NSdateFormatter in iPhone SDK programming
iPhone SDK Comparing Strings
In this section I will show you how you can compare the two strings in your iPhone SDK Project. To compare the Strings you will have to use... of comparing strings in iPhone sdk programs. The == operator only compares
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
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
Orientation iPhone SDK
Orientation iPhone SDK In this tutorial we are going to show you how to set orientation in iPhone application. While developing the application in iPhone... of TabBar application. Every time you need to hide the tabbar whenever orientation
Forgot Password of Application
Forgot Password of Application  Forgot Password of Application through servlet and jsp
Forgot Password of Application
Forgot Password of Application  i want sample code for Forgot Password of Application
Use of SVOX SDK 5.0.0 for text to speech in iphone project
Use of SVOX SDK 5.0.0 for text to speech in iphone project  how to implement svox sdk for text to speech in xcode. I need a sort of exmaple for it...awaitinh ofr your reply thanks
Use of SVOX SDK 5.0.0 for text to speech in iphone project
Use of SVOX SDK 5.0.0 for text to speech in iphone project  how to implement svox sdk for text to speech in xcode. I need a sort of exmaple for it...awaitinh ofr your reply thanks
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
 

 

 

DMCA.com