Please,
I need an option or solution for your component SDAC v4.80 with Delphi 2010
I am trying to migrate from Delphi 7 to Delphi 2010, but when I open a TMsQuery with a parameter assigned with AsString, the SDAC consider the value as NVARCHAR on Sql 2005/2008 but my fields in DB are VarChar. This cause some performance hits.
I need a property like UseUnicode = False for the connection that will affect the Params[x].AsString, and when the property is at False, the Sql query will use VarChar (like AsAnsiString). I can't use AsAnsiString because it will cause a lot of working to do it. (I can not replace everywhere when I see AsString because I must keep compatible the code with Delphi 7 and I have a lot of Params using by TClientDataSet.)
I already change the source in DB.pas from Delphi, but your component have is own Params and I don't have the source code to change it.
Could you help me to override your component or add the new property?
Thanks!
Delphi 2010, Sql NVARCHAR and UniCode
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
To solve the problem you can use the DBAccess.ParamStringAsAnsiString variable.
This variable has sense for Delphi 2009 and higher.
Set its value to True to use the AsAnsiString property when setting the parameter value through TDAParam.AsString. Otherwise the AsWideString property is used. The default value is False.
This variable has sense for Delphi 2009 and higher.
Set its value to True to use the AsAnsiString property when setting the parameter value through TDAParam.AsString. Otherwise the AsWideString property is used. The default value is False.