RB Smissaert wrote:
As to quotes etc.
As my code works fine as it is I probably will leave this as the double
quotes look ugly and it will be a reasonably big job to alter all this.
Did I get you right that the only benefit of doing create "table1" etc.
is compatibility with running sqlite with SQLite.exe?

The benefit to using standard quoting for identifiers is portability. Your table definitions will almost certainly be rejected by almost any other database engine. Most don't support the same extended quoting rules that sqlite has added for compatibility with files coming from other sources.

If adding the escaped quotes to the SQL generation statements doesn't work for you, then you could create a simple function that adds the escaped quotes to your identifier variables. If you simplify the problem and assume you will never use double quote characters in your identifier names themselves this function is very simple;

   Function Quote(id As String) As String
       Quote = """" & id & """"
   End Function

and your code becomes something like this.

   strTable = "table1"
   strColumn = "ID"
strSQL = "create " & Quote(strTable) & "(" & Quote(strColumn) & " INTEGER PRIMARY KEY)"

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to