On the Lambda

Programming, Technology, and Systems Administration

On the Lambda

Entries Tagged as 'sql'

Certificate Authentication in SQL Server

November 23rd, 2020 · No Comments · development, networking, security, sql, Sql Server

I sometimes see questions asking how to do certificate authentication in SQL Server. Contrary to what you may have heard, SQL Server does indeed have support for certificate authentication. It just looks a little different from how some other database products do it. Instead, SQL Server’s equivalent option is the Integrated Security feature. It works like this…

[Read more →]

Tags:

Can we stop using AddWithValue() already?

May 12th, 2014 · 13 Comments · .net, c#, sql

I see code examples posted online all the time that look like this: cmd.Parameters.AddWithValue(“@Parameter”, txtTextBox1.Text); This needs to stop. There is a problem with the AddWithValue() function: it has to infer the database type for your query parameter. Here’s the thing: sometimes it gets it wrong. This especially happens with database layers that deal in Object arrays […]

[Read more →]

Tags:

The N Word

May 9th, 2014 · No Comments · sql, Sql Server

No, not that N word. I’m talking about N string literal prefixes in T-SQL. Like this: SELECT * FROM Foo WHERE Bar = N’Baz’ If you don’t know what that N is for, it tells Sql Server that your string literal is an nvarchar, rather than a varchar… that is, that the string literal may […]

[Read more →]

Tags: