I own an HTC Touch HD as was getting a bit annoyed at Internet Explorer being the default browser when selecting links from emails. However, Opera Mobile has a ‘hidden’ configuration screen and can be used to set it as the default :
- Run Opera
- Enter ‘opera:config’ in the address bar
- Find the ‘Install’ section
- Select ‘Browser First Time Launch’ checkbox
- Press ‘Save’
- Soft reset
I was going through a mountain of pain trying to get an import working from an Excel spreadsheet working into SQL Server 2005 but I finally managed it and here’s how…
Here’s the SQL I’m using (slightly abridged!) :
set transaction isolation level read committed
declare @sql nvarchar(1024)
set @sql = 'select * into ##Temp from opendatasource(''Microsoft.Jet.OLEDB.4.0'', ''Extended Properties=Excel 8.0;Data Source=' + @ExcelFileToImport + ''')...' + @ExcelWorkSheet
exec sp_executesql @sql
Points to note :
I was having trouble executing within a transaction but with the changes made above the sql could be called with the following :
using (TransactionScope scope = new TransactionScope())
{
UploadExcelIntoDatabase(importTicket, importFilename);
scope.Complete();
}
Selecting data from a stored procedure in SQL Server is already a documented feature and here’s an example:
insert into #systables exec sp_executesql N'select * from Northwind.sys.tables'
…problem is this example doesn’t run without first creating the temp table and therefore knowing all the column definitions. When I’m running quick queries this isn’t exactly convenient. I’ve seen blogs posts using a linked server but there’s another way :
select * into #systables
from openrowset(
'sqlncli',
'server=.;trusted_connection=Yes',
'sp_executesql N''select * from Northwind.sys.tables'''
)
I wouldn’t necessarily use this as a day-to-day process on a production environment but for administration or scripting installations I think it fits the bill.