Search Results

Search found 12 results on 1 pages for 'prash'.

Page 1/1 | 1 

  • SQL03070: This statement is not recognized in this context

    - by prash
    Recently I have started working with VS2010 and Fx4. There have been various challenges. We also introduced a new Database Project in our solution. And found this error. The reason for this error is: the project system expects the stored procedure as a create statement only.  The additional statements to drop if existing are not necessary within the project system.  Project deployment takes care of detecting if the sproc already exists and if it needs to be updated. To resolve this error you can simply remove the additional statements other then your create SP, Function etc. OR Exclude the file from build. Right Click on your file in Solution Explorer, Click Properties > Build Action > Not in Build

    Read the article

  • Build vs Rebuild

    - by prash
    Build means compile and link only the source files that have changed since the last build, while Rebuild means compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster. Sometimes the versions of project target components can get out of sync and rebuild is necessary to make the build successful. In practice, you never need to Clean. Build or Rebuild Solution builds or rebuilds all projects in the your solution, while Build or Rebuild <project name> builds or rebuilds the StartUp project. To set the StartUp project, right click on the desired project name in the Solution Explorer tab and select Set as StartUp project. The project name now appears in bold. Compile just compiles the source file currently being edited. Useful to quickly check for errors when the rest of your source files are in an incomplete state that would prevent a successful build of the entire project. Ctrl-F7 is the shortcut key for Compile. All source files that have changed are saved when you request a build/rebuild, so you don't have to save them first. When you run your executable (F5 or Ctrl-F5), Visual Studio saves all your changed source files and builds anything that changed, so you don't need to explicitly do those steps every time. This allows for quick "trial and error" debugging. Incidentally, if you like those little Visual Studio keyboard shortcuts, you can download posters of the C# and the VB.Net ones, respectively (I am personally a big fan of using keyboard shortcuts :) ).   Visual Studio 2010 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=92ced922-d505-457a-8c9c-84036160639f   Visual Studio 2005 C#: http://www.microsoft.com/downloads/details.aspx?FamilyID=c15d210d-a926-46a8-a586-31f8a2e576fe&DisplayLang=en VB.NET: http://www.microsoft.com/downloads/details.aspx?FamilyID=6bb41456-9378-4746-b502-b4c5f7182203&DisplayLang=en

    Read the article

  • Regarding xml parsing in iphone

    - by Prash.......
    hi... I am developing an applictaion in which i am doing xml parsing i found an error in [xmlparse parse] method. and the error for this is as follows: [NSCFString bytes]: unrecognized selector sent to instance 0x3df6310 2010-04-30 00:09:46.302 SPCiphone2[4234:1003] void SendDelegateMessage(NSInvocation*): delegate () failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode code snippet for this as follows. responseOfWebResultData = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSLog(@"result: %@", responseOfWebResultData); //starting the XML parsing if(responseOfWebResultData) { @try { xmlParser = [[NSXMLParser alloc] initWithData:responseOfWebResultData]; [xmlParser setDelegate: self]; [xmlParser setShouldResolveExternalEntities: YES]; [xmlParser parse]; [responseOfWebResultData release]; } @catch(NSException *e) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please " message:[e reason] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; [alert release]; } }

    Read the article

  • Retrieving and displaying AddressBook in Table view.

    - by Prash.......
    hi, I am developing an application in which i have to retrieve all Addressbook (Name & Phone No) records and Display it in table view, this is my Snippet for retrieving records from addressbook. NSArray *tableGroups; ABAddressBookRef m_addressbook = ABAddressBookCreate(); if (!m_addressbook) { NSLog(@"opening address book"); } CFArrayRef allPeople= ABAddressBookCopyArrayOfAllPeople(m_addressbook); CFIndex nPeople = ABAddressBookGetPersonCount(m_addressbook); NSMutableArray *selectableRows = [NSMutableArray array]; for (int i=0;i < nPeople;i++) { ABRecordRef ref = CFArrayGetValueAtIndex(allPeople,i); ABMutableMultiValueRef phoneMulti = ABRecordCopyValue(ref, kABPersonPhoneProperty); CFStringRef phoneNumber= ABMultiValueCopyValueAtIndex(phoneMulti, i); NSString *contactFirstLast = [NSString stringWithFormat:@"%@,%@", ABRecordCopyValue(ref, kABPersonFirstNameProperty),phoneNumber]; printf("%s\n", [contactFirstLast UTF8String]); [selectableRows addObject:[NSString stringWithFormat:contactFirstLast, i]]; CFRelease(phoneNumber); CFRelease(ref); CFRelease(contactFirstLast); CFRelease(phoneMulti); } tableGroups = [[NSArray alloc] initWithObjects:selectableRows, nil]; I am getting exception as "CFRetain" and apps get crash. Please suggest me proper solution for that..

    Read the article

  • Problem in type casting in NSDate to NSString?

    - by Prash.......
    Hi, I developing an application, in which i found a ridiculous problem in type casting, I am not able to type cast NSDate to NSString. NSDate *selected =[datePicker date]; NSString *stringTypeCast = [[NSString alloc] initWithData:selected encoding:NSUTF8StringEncoding]; From ,above snippet datePicker is an object of UIDatePickerController.

    Read the article

  • Regarding Sqlite Datbase connectivity in iphone

    - by Prash.......
    hi.. I am developing an application in iphone in which i have to do the database connectivity using sqlite. I have made a "clsDBManage" class which contains 4 functions open_database, close_database, is_database_open, getdatabase_connection, which are globally defined ,i have a screen called "user details" in which i am filling the user details such as name , mobileno , email-id , password, i want that when user feeds the info it should get connected with database and store the details entered and should authenticate the user the next time he logs in. (Just as we have yahoo login,gmail login screen) clsDBManage.h +(int) openDBConnection; +(int) closeDBConnection; +(BOOL) IsDatabaseOpen; +(sqlite3 *)getDBConnection; clsDBManage.m import "clsDBManage.h" import "Types.h" sqlite3 *DBConnection=nil; @implementation clsDBManage +(int) openDBConnection { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"iphone.sqlite"]; //Before if ([self IsDatabaseOpen] == YES) [self closeDBConnection]; // Open the database. The database was prepared outside the application. if (sqlite3_open([path UTF8String], &DBConnection ) == SQLITE_OK) { ifdef _DEBUG NSLog(@"Database Successfully Opened :)"); endif return CON_RET_SUCCESSFUL; } else { ifdef _DEBUG NSLog(@"Error in opening database :("); endif return CON_RET_ERROR; } } +(BOOL) IsDatabaseOpen { if(DBConnection != nil) { //add if condition to check database is in open state or close state return YES; } else { return NO; } } +(int) closeDBConnection { @try { if(DBConnection != nil) { sqlite3_close(DBConnection); DBConnection = nil; return CON_RET_SUCCESSFUL; } else { return CON_RET_ERROR; } } @catch (NSException * e) { NSLog([e reason]); } } +(sqlite3 *)getDBConnection { if ([self openDBConnection] == 1) return DBConnection; else return nil; } @end //classDBManage file is my handler class where i have written code to open database //my addprofile functions -(NSInteger)addProfile:(NSString *)mobileno:(NSString *)country:(NSString *)username:(NSString *)screenname:(NSString *)emailid:(NSString *)password:(NSString *)retypepassword { @try { sqlite3 *db =[clsDBManage getDBConnection]; if (db != nil) { sqlite3_stmt *statement =nil; const char *sql = "insert into SPCaccountdetails(MobileNo , Country , UserName , ScreenName, EmailId, Password, RetypePawssword) Values(?,?,?,?,?,?,?)"; if(sqlite3_prepare_v2(db, sql, -1, &statement, NULL) != SQLITE_OK) { //NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(db)); } sqlite3_bind_text(statement, 1, [mobileno UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 2, [country UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 3, [username UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 4, [screenname UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 5, [emailid UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 6, [password UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(statement, 7, [retypepassword UTF8String], -1, SQLITE_TRANSIENT); if(SQLITE_DONE != sqlite3_step(statement)) { NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(db)); } sqlite3_finalize(statement); } } @catch(NSException *e) { //[clsMessageBox ShowMessageOK:@CON_MESSAGE_TITLE_MESSAGE_USER_PROFILE :[e reason]]; } return CON_RET_SUCCESSFUL; } //button click event where i am calling addprofile function;_ [self addProfile:txtMobile :txtCountry :txtName :txtScreenname :txtemailid :txtpassword :txtretypepassword];

    Read the article

  • How to bind the arguments in NSString in iphone?

    - by Prash.......
    Hi, i developing an application in which i want to bind my own parameter with an URL for http post request. But i findout the serious problem during the string binding, The code snippet as follows: NSString *mainURL1 = @"http://xxx.xxx.xx.xx/webservice/Service.asmx?op=UserDetailsNew?"; NSString *mainURL2 = [mainURL1 stringByAppendingString:@"MobileNo=%@",txtMobile.text]; NSString *mainURL3 = [mainURL2 stringByAppendingString:@"&Country=%@",txtCountry.text]; NSString *mainURL4 = [mainURL3 stringByAppendingString:@"&UserName=%@",txtName.text]; NSString *mainURL5 = [mainURL4 stringByAppendingString:@"&ScreenName=%@",txtScreenname.text]; NSString *mainURL6 = [mainURL5 stringByAppendingString:@"&EmailId=%@",txtemailid.text]; NSString *mainURL7 = [mainURL6 stringByAppendingString:@"&Password=%@",txtpassword.text]; NSString *mainURL8 = [mainURL7 stringByAppendingString:@"&RetypePassword=%@",txtretypepassword.text]; NSString *mainURL9 = [mainURL8 stringByAppendingString:@"%20HTTP/1.1"]; on binding the runtime arguments it ginev me too many parameter appending in NSString function. how i solve above problem?

    Read the article

  • How to change the language of application in iphone

    - by Prash.......
    hi, I am developing an application, in which i am giving user to select other language , by default the application will be in English , if user selects other language from the list. The application language should be get changed to the respective language. I know the concept of Localization, but if there any way to do that, if i want to do that using localization please suggest me proper steps for that. please suggest me solution for that.

    Read the article

  • Removing time from date format

    - by Prash.......
    Hi, I am developing an application in that i have used DatePicker to pick the date but it gives me date with time .I have converted that format into string, now i just want date from that. How should i do that.Plz suggest me something. Following is my code Snippet. NSDate *selected =[datePicker date]; NSString *dateString = [NSString stringWithFormat:@"%@", selected]; here date picker is object of UIDatePicker.

    Read the article

  • Implementing activity indicator

    - by Prash.......
    I am implementing an activity indicator in my application. In my application on button click a webservice is called and it takes some time. To show the user that process is going on I implemented an activity indicator: CGRect frame = CGRectMake(140, 300, 40, 37); UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:frame]; activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; [self.view addSubview:activityIndicator]; This Snippet is written in viewDidLoad() method, and I have an action called, -(IBAction)agree:(id)sender { //here webservice is called } I have to start that activity by [activityIndicator startAnimating]; But I am unable to start that activityIndicator, please suggest a proper solution for that.

    Read the article

  • MySQL Query - WHERE and IF?

    - by Prash
    I'm not quite sure how to right this query. Basically, I'm going to have a table with two columns (OS and country_code) - more columns too, but those are the conditional ones. These will be either set to 0 for all, or specific ones, separated by commas. Now, what I'm trying achieve is pull data from the table if the OS and country_code = 0, or if they contain matching data (separated by commas). Then, I have a column for time. I want to select rows where the time is GREATER than the time column, unless the column time_t is set to false, in which case this shouldn't matter. I hope I explained it right? This is what I kind of have so far: $get = $db->prepare("SELECT * FROM commands WHERE country_code = 0 OR country_code LIKE :country_code AND OS = 0 OR OS LIKE :OS AND IF (time_t = 1, expiry > NOW()) "); $get->execute(array( ':country_code' => "%{$data['country_code']}%", ':OS' => "%{$data['OS']}%" ));

    Read the article

1