SQL Wrappers

From: David Cressey <david.cressey_at_earthlink.net>
Date: Fri, 09 Dec 2005 13:42:52 GMT
Message-ID: <wRfmf.1516$3Z.1301_at_newsread1.news.atl.earthlink.net>



The recent discussion about SQL-wrappers reminded me of something.

I once worked with a dialect of SQL that provided access to data stored in files as well as data stored in a database. The format of the files was comma separated values (CSV), the access was read only, and a secondary file was needed to declare the column names, among other things.

In that context, it was straightforward to code something into the CSV file that would result in a NULL being passed to the SQL user. All you had to do was code two commas in a row. Since there was nothing between the commas, the wrapper generated a NULL.

That raises the question, how do you pass an empty string? The answer was that you had to put a pair of quote marks between the two commas in the CSV file. The two quotes explicitly marked a string, and the fact that there was nothing between them marked an empty string. This was a nuisance, to be sure, but it was a minor nuisance.

All of this raises another question for me. When is SQL NOT a wrapper? Received on Fri Dec 09 2005 - 14:42:52 CET

Original text of this message