Are you aware that the images won’t fit into memory all at once? If you want to scroll between them, you have to page them in and out to keep a decent memory footprint.

As for loading them, you should probably display a spinner, start loading the image in background and then replace the spinner with the image once it’s ready. Loading the image using NSURLConnection is overkill, you’ll probably have it easier with imageNamed:

- (void) startLoadingImage {
    // You need an autorelease pool since you are running
    // in a different thread now.
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    UIImage *image = [UIImage imageNamed:@"foo"];
    // All GUI updates have to be done from the main thread.
    // We wait for the call to finish so that the pool won’t
    // claim the image before imageDidFinishLoading: finishes.
    [self performSelectorOnMainThread:@selector(imageDidFinishLoading:)
        withObject:image waitUntilDone:YES];
    [pool drain];
}

- (void) viewDidLoad {
    UIActivityIndicator *spinner = …;
    [self.view addSubview:spinner];
    [self performSelectorInBackground:@selector(startLoadingImage)
         withObject:nil];
}

- (void) imageDidFinishLoading: (UIImage*) image {
    // fade spinner out
    // create UIImageView and fade in
}


The method names are spelled from memory, I might have missed a param here or there. But in principle the code is sound.

UIImage - should be loaded with [UIImage imageNamed:@""] or not?
I am running the following query to import a csv file:

SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=D:\Documents\;', 'SELECT * from file.csv') AS something


I am getting this error:

OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".


This is what I have done to try an resolve the issue, neither of which was enough:


MsSQL and IIS have access to the folder and file in question. They also both have access to the temporary folder for Network Services under which SQL server is running.
I have enabled Ad Hoc Distributed Queries using sp_configure
I have fixed the registry key DisallowAdhocAccess by setting it to 0
I have installed Microsoft Access Database Engine 2010 Redistributable


The system is a Windows 2008 Server running SQL Server 2012 Express, but the issue has been replicated with SQL Server 2008 as well.

At this point any random ideas are appreciated :). Thanks!
