Re: ADO exception with character combination inside string...



On 21 Sep 2006 07:28:33 -0700, "Bill Todd" <no@xxxxxx> wrote:

Enclose TNC:\CHARLIE in single quotes. Any database that follows the
SQL standard will assume that a string enclosed in double quotes is a
quoted identifier (table name, field name, etc.) not a string literal.

The string being sent as SQL is composed like this:
SQL := 'UPDATE Categories SET [Description] = ''' + edData.Text + '''
WHERE CategoryID = 4';

As you can see the actual description text entered via the edData
control *is* enclosed in single quotes, but the text entered inside
the edData is what will contain the text
set file = "TNC:\CHARLIE.D"
The whole idea is that we need to save the double quotes inside the
database and this works fine from VisualBasic, from Query Analyzer and
from within Delphi using TADOConnection.Execute(), but not if the
TADOQuery is used. However, a solution has been found to switch off
the parameter extraction function of that component that is switched
ON by default..

.



Relevant Pages

  • Re: Recommended command line syntax
    ... >> The text with quotes bit has a question mark which indicates that you are ... the string, ... Parsing for the next switch is a bad idea; ... Steve Revill @ Home ...
    (comp.sys.acorn.programmer)
  • Re: Update existing values incrementally w/UPDATE SQL
    ... I think it would be safe to say, use the Dim statement any time you are ... Dim basically tells vba that you want to initiate a new variable. ... As far as quotes go, this was one of the trickiest ... Consider vba's interpretation of a string: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Update existing values incrementally w/UPDATE SQL
    ... and in the book; Access 2007 VBA Programmer's Reference. ... As far as quotes go, this was one of the trickiest ... Consider vba's interpretation of a string: ... when an SQL is processed (I use an SQL example because it is the most ...
    (microsoft.public.access.modulesdaovba)
  • Re: Update existing values incrementally w/UPDATE SQL
    ... pretend that Me.txtString is a control on your form, ... You cant put Me.txtString inside the double quotes, or VBA just reads it as a ... and in the book; Access 2007 VBA Programmer's Reference. ... when an SQL is processed (I use an SQL example because it is the most ...
    (microsoft.public.access.modulesdaovba)
  • Re: SQL WHERE STMT PROBLEM
    ... is defined as a String variable, it is therefore not possible for it to ever ... possibly assign the value "False" to the BsSql variable. ... Dim oRst As DAO.Recordset ... > single and dbl quotes as instructed to produce the above BsSql ...
    (microsoft.public.access.queries)