Page 1 of 1
Fixed command "set quoted_identifier on" in MS-SQL
Posted: 04.08.2006, 15:35
by rpelisson
The ZConnection using a fixed command for the parameter quoted_identifier in MS-SQL
In the servers with SQL Server 2000 this is working with succes, but in MS-SQL 7.0 what use almost commands using double quotes generate a SQL error and not was executed.
The new propertie for ZConnection solve this problem.
See the attachment
Posted: 08.08.2008, 23:30
by mdaems
rpelisson,
I know, this is a very old post...
Time to do something about it.
I just checked it. And I have a question. You propose
Code: Select all
// alterado Rafael 11/07/2006
// - O parametro estava Fixo, foi criada para habilitar a opção de quoted OFF
// InternalExecuteStatement('set textsize 2147483647 set quoted_identifier on');
S:= Info.Values['quoted_identifier'];
If S='' Then
S:='on';
InternalExecuteStatement('set textsize 2147483647 set quoted_identifier '+S);
Is it necessary to have a parametrizable identifierquote setting?
My impression is that it would be better to use
Code: Select all
InternalExecuteStatement('set textsize 2147483647 set quoted_identifier '+GetMetaData.GetIdentifierQuoteString);
Because this is the constant Zeoslib uses when it has to create statements including quoted identifiers.
When Mssql supports custom quoting characters and you want the feature in Zeoslib, this should be implemented using the Metadata objects. eg. By setting the value of the GetIdentifierQuoteString in the Metadata object. That way automatically generated queries also use the right quoting.
Mark