Re: SQL statement contain " character




>I am using the QuotedStr function. The SQL statement produced is valid -
>it is accepted if I execute it against SQL Server in Query Analyzer.
>
>The problem is somewhere between my code and the database. Looking
>through the source for ADOdb.pas it appears that it is converting the
>statement to a parameterised statement. This is failing when the double
>quote is in there but works if it is taken out. It also works if I set
>ParamCheck to false.
>
>I just want to know why

I just tested this dynamically assembled SQL against the Orders table in the
Northwind sample database. Tell me what is different with what you are doing?

CommandText := 'Update orders set shipaddress = '+
QuotedStr('This is a test " string with doublequote')+' where OrderID = 10248';



--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Re: SQL Server problem on sbs 2K3 + wss sp2
    ... SQL Query Analyzer ... How can I tell if SQL Server is running, ...
    (microsoft.public.windows.server.sbs)
  • Re: Query Analyzer Debuging
    ... > I am connecting to a SQL 2k Server SP3 on a different machine on the ... > network using SQL Query Analyzer 8.00.760. ... only the Query Analyzer. ... both on SQL Server and on the workstation. ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL Berechtigungen
    ... In der Programm Gruppe SQL Servers findest Du den Query Analyzer. ... dann zum jeweiligen SQL Server verbinden. ... Wähle die Datenbank und mache ein SELECT auf ...
    (microsoft.public.de.access.clientserver)
  • RE: sql script
    ... I'm assuming you are referring to executing queries within the SQL Server CE Query Analyzer. ... | Thread-Topic: sql script ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL Enterprise Manager
    ... Thouh I can query using Query Analyzer but Enterprise Manager ... Rest of my team is having no problem accessing SQL Server. ...
    (microsoft.public.sqlserver.tools)

Quantcast