Skip to content

{ Category Archives } Databases

Posts about databases in general — not InterBase-specific content.

Ad-hoc SQL/POCO Queries in Entity Framework 4.0

Since version 4.0, the Entity Framework has had the ability to query un-mapped data and project it onto POCOs using ad-hoc SQL.
Here, for example, is how we check the current SQL Server version:

internal class SqlVersionInfo

Tagged , ,

Sometimes, SELECT Really Is Broken

We got a bug report from a customer the other day; a certain query in one of our web services was giving the following error:
A column has been specified more than once in the order by list. Columns in the order by list must be unique.
Seems clear enough, except that

There was no duplication in [...]

Tagged , ,

In LINQ, Don’t Use Count() When You Mean Any()

If you have a list, array, or query in a C#/LINQ application and need to check and see if the list is empty, the correct way to do this is to use the Any() extension method:

if (q.Any())

Similarly, you can check to see if any elements in the list meet a certain condition:

if (q.Any(i => i.IsSpecial))

If [...]

Tagged , ,

Don’t Depend Upon the ASP.NET Membership Tables

One very popular option for implementing user security in ASP.NET is to use Forms Authentication with the SQL Server membership provider. This provider creates several database tables to store user-related information, as well as a number stored procedures.
From time to time, a developer will attempt to add the ASP.NET Membership/Forms Authentication tables to their Entity [...]

Tagged , , , ,

Entity Framework Models and Source Control

As you’re probably aware, an Entity Framework model is stored in a single XML file, with the extension EDMX. Developers occasionally ask if this means that two people cannot work on the entity model concurrently. My answer to this is, "It depends." But I can give you some tips to make it easier.
Obviously, if you [...]

Tagged , , ,

Static Analysis and Generated Code

In recent months, I’ve been thinking about the problem of static analysis in generated code. Static analysis means using tools like FxCop and NDepend (for .NET apps) lint (for C) and CodeHealer (for Delphi) to find potential problems in your source code. Generated code is code written not by a human being, but by [...]

Tagged , , , , , , ,

Skip(0) in LINQ and Testing

A couple of weeks ago, I wrote In LINQ, Beware of Skip(0). In that post, I observed that calling Skip(0) on a query result in LINQ, which has no effect on the dataset returned, imposes a performance penalty with at least some LINQ providers. At the time I commented that there might be some desirable [...]

Tagged , ,

A Not-So-Secret Sale

Upscene Productions is offering their Database Workbench Pro product for 75% off, through 28 March 2009 only. They call this the "Super Secret Sale," but since Martijn asked me to post it here, I’m not sure how much of a secret it is. Anyway, 75% off is about as cheap as you’ll ever find it, [...]

Tagged ,

All Access

Embarcadero’s DavidI and Mike Rozlog stopped by the Vertex Systems office on Wednesday to chat with us about Embarcadero’s plans for the near future and David’s personal developer wish list.
They told us about the All Access product, which had been officially released that day. One of the most interesting things about this product is that [...]

Tagged , , , , , , , ,

Database Workbench Lite for InterBase

Martijn Tonies e-mailed me to inform me of the release of Database Workbench Lite for InterBase.  It’s a free version of Database Workbench, a full-featured administration tool for InterBase and other database servers.  You can compare the "lite" and "professional" feature sets here. Upscene had also just released version 3.2 of Database Workbench Professional.
Share This [...]

Bad Behavior has blocked 1226 access attempts in the last 7 days.