Page 1 of 1
					
				Problem with type of field
				Posted: Wed  25 Nov 2009 15:24
				by Sandro.nil
				Hi,
We are substituing the vitavoom driver to devart driver "dbxpgsql110", but we are having a problem with type of field.
When a ClientDataSet is open  it's happening the following error:
Tape mismatch for Field "empresa_razaosocial", expeting: String Actual: WideString.
We are using Delphi2010 and PostgreSql 8.2.7.
PS' When we were using vitavoom driver it was work.
thank's.
			 
			
					
				Veja opção "UseUnicode"
				Posted: Thu  26 Nov 2009 11:06
				by Claudio
				Veja na documentação:
UseUnicode
Enables or disables Unicode support. Affects character data fetched from the server. When set to True all character data is stored as WideStrings and TStringField is replaced with TWideStringFiled.
This option is available for Delphi 2006 and higher IDE versions.
Default value of this option is True for Delphi 2009 and higher IDE versions, and False for Delphi 2006 and 2007.
const
  coUseUnicode = TSQLConnectionOption(209); // boolean
. . .
  SQLConnection1.SQLConnection.SetOption(coUseUnicode, Integer(True));
			 
			
					
				
				Posted: Thu  26 Nov 2009 15:42
				by Sandro.nil
				Ola Claudio,
obrigado pela dica, mas o meu componente TSQLConnection não dispoe desse metodo.
SQLConnection.SQLConnection.SetOption(coUseUnicode, Integer(True));
meu componente esta com o seguinte nome "SQLConnection"
não diponibilizou o metodo .SetOption
alguma dica?
			 
			
					
				Instalar TCRSQLConnection
				Posted: Thu  26 Nov 2009 16:29
				by Claudio
				Olá,
Vc tem que instalar o componente "TCRSQLConnection" que vem junto.
Veja pacote em
\Program Files\Devart\Dbx\PostgreSQL\Source\Delphi14
Boa sorte t+
			 
			
					
				
				Posted: Thu  26 Nov 2009 18:56
				by Sandro.nil
				Ola claudio.
mais uma vez agradeço sua atenção,  mas não consegui instalar o pacote esta dando um erro na compilação.
pelo que li na documentação creio esta fazendo certo.
o erro é esse:
[DCC Fatal Error] CRDbxDesign.pas(17): E2225 Never-build package 'dcldbx' must be recompiled
tem mais uma dica?
vc tb usa delphi 2010?
desde ja agradeço.
			 
			
					
				
				Posted: Fri  27 Nov 2009 12:02
				by Claudio
				Olá,
Uso delphi 2010, não tive esse problema.
Verifique se vc está usando o pacote correto.
Eu só abri o pacote "dclcrdbx140" e instalei.
			 
			
					
				
				Posted: Fri  27 Nov 2009 13:02
				by Plash
				You don't need TCRSQLConnection for Delphi 2010. This component is provided for backward compatibility.
Use standard TSQLConnection component, and add
UseUnicode=False
or
UseUnicode=True
to its Params property.