LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

A Firefox extension I’ve been wanting for a long time

Today I noticed a post on How-to geek in my rss-feeder Modify New Tab Behaviour in Firefox with NewTabURL. Now that is something I have been looking for, for a long time now. I think the default blank thing is nothing, I want my homepage to show up when I open a new tab. And I think FF should have had this ages ago. But an extension works for me.

Read More...

Recover a database without the ldf file

Test case: SQL Server 2000 and up in Full recovery model. Simple recovery will not reacte this way as the log is utilized differently by SQL Server based on the recovery models. Thanks to @DenisGobo and @bonskijr for the great conversation and test cases on this topic. Again today I read a few threads and even saw on twitter where a person (DBA or not) was in panic mode because they had lost the ldf file for a database.

Read More...

How To: Savitsky-Golay smoothing

Introduction When I talk about smoothing I think of two things in the programming world. The first is for images when you want to “blend” hard edges and the second is the smoothing of a graph with the purpose of cutting down on noise, this is the one I will be talking about today. Let’s say we start off with a graph like this. Why would you use smoothing on a graph?

Read More...

Upgrading to win 7 can take a while

Today I was planning on upgrading my work development machine to win 7, I already installed it at home and I like it much better than Vista. So I have Vista x64 at work, the Dutch version. I have no idea why I ever chose the Dutch version for this machine but I did it and there is no turning back now. I made a mistake and I will have to suffer for it.

Read More...

Grid class that allows sorting by clicking on headers

Unlike the ASP.NET GridView Class, the Visual Foxpro native grid class does not provide a means for automatic sorting by clicking on the column header. Although there are several workarounds for this deficiency available (such as http://www.rcs-solutions.com/downloads.aspx), here is my solution using my grdSorting class which allows automatic sorting by clicking on the column headers. Attached also is the library containing this class and two bmp files for displaying Up and Down arrows.

Read More...

Using ASP to retrieve a recordset and return value from a stored procedure at the same time

(This post will use ASP, coded with server side JScript) When accessing an SQL stored procedure in ASP via ADO, it is typically considered best practice to use the command object: var oConn = Server.CreateObject("ADODB.Connection"); oConn.Open("Provider=SQLOLEDB; Data Source=ServerName; User Id=ID; Password=PASSWORD"); var oCmd = Server.CreateObject("ADODB.Command"); oCmd.ActiveConnection = oConn; oCmd.CommandType = adCmdStoredProc; oCmd.CommandText = "StoredProcedureName"; oCmd.Execute(); oCmd.Close(); oConn.Close(); If the stored procedure returns a recordset, then the Execute() method of the command object will return a recordset object.

Read More...

SQL Server 2008 R2 August Community Technology Preview (CTP) Announced

Microsoft has just announced the release of the August Community Technology Preview (CTP) of SQL Server 2008 R2. You might have heard about this before when people talked about Kilimanjaro and Project Gemini. Why should you download the CTP? Explore the enhanced database management capabilities in SQL Server Management Studio. Preview SQL Server StreamInsight, Microsoft’s new complex event processing technology Be the first in your organization to run SQL Server on more than 64 processor cores.

Read More...

How to insert information into multiple related tables and return ID using SQLDataSource

In the ASP.NET forums I am frequent the question of inserting information into multiple related tables is asked very often. I want to share my solution of this problem. The answer is based on this thread ASP.NET thread

Please also take a look at this article showing how to get ID of the newly inserted record.

Also, one more word about TRY/CATCH logic in this procedure. I took this idea from Kevin Goff’s article Touch/Peel/Stand, then Try/Catch/Raise

Read More...

Professionalism

I am sure that people see the word professionalism and it brings to mind a variety of things. For me, it means the ability to deal with work-related issues in a non-personal (and typically non-confrontational) manner. However, I have discovered on more than a few occasions that not everyone holds to the same standard. And, in the interest of full disclosure, I did not always adhere to that standard, either. But I was lucky enough to have a manager one day sit me down – after we’d had a huge blowup in front of the rest of the staff – and explain to me that being professional did not mean being good at what I did but also meant being able to work as a part of a team and not bringing personal issues into my daily professional life.

Read More...

Working with Excel to match data 101

As a DBA or DB Developer, it probably seems like a fundamental task to import an excel sheet in order to match some data up to the contents, create a report, import into other tables and such. I was asked yesterday how to do this though by a developer and realize it may not be all that straight forward on the ways to do it. I thought I’d show a few ways just so it’s up there.

Read More...