Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Error #1100 after switching to Unicode
Wed, Apr 12 2017 12:09 PMPermanent Link

Burkhard Schneider

isyControl Software

Hi all,

Im porting an Application from Delphi 2007 to XE5, both EDB 2.24 Build 3

My Database was created with the D2007-version, therefore it's characterset is ANSI.

In the Unicode version of my application I have access to the data in local mode, but when I set SessionType:=etRemote I get this message when opening a dataset:

ElevateDB Error #1100 A connection to the server at 127.0.0.1 cannot
be established (Socket error: An existing connection was forcibly
closed by the remote host.  (10054), on API 'recv')

Engine.CharacterSet and Session.CharacterSet both are csAnsi on client side and on server side.

What can I do?

Seems that is has something to do with this issue:
http://www.elevatesoft.com/forums?action=view&category=edb&id=edb_general&msg=13093&start=1&keywords=10054&searchbody=True&forum=EDB_Announce&forum=EDB_General&forum=EDB_SQL&forum=EDB_Connect&forum=EDB_Extensions&forum=EDB_Beta&forum=EDB_Binaries&forum=EDB_Suggestions&forum=EDB_ThirdParty&forum=EDB_Discussion#13093
Thu, Apr 13 2017 2:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Burkhard


1. are you pointing at the same dataset in both local & remote instances?
2. can you open the dataset in local & remote modes using EDBManager?

Roy Lambert


---
This email has been checked for viruses by AVG.
http://www.avg.com
Thu, Apr 13 2017 3:03 AMPermanent Link

Burkhard Schneider

isyControl Software

Roy,

Yes and Yes.

Meanwhile the problem is solved, but I don't know why.

I copied edbsrvr.exe to the location of my configuration files and started it from there. In the Server options of edbsrvr the character set was set to Unicode. So I switched it to ANSI an it worked.

Now It workes also with my own server-app, both the D2007 and the XE5 versions.

An other test on an other machine with an other configuration file (also created by my old D2007 version) shows that there were no problems at all. Perhaps there was something wrong with my configuration file.
Fri, Apr 14 2017 10:43 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Burkhard,

<< I copied edbsrvr.exe to the location of my configuration files and started it from there. In the Server options of edbsrvr the character set was set to Unicode. So I switched it to ANSI an it worked. >>

I assume that you were using 2.14 or lower prior to updating ?  If so, then this was covered in the release notes, specifically this section:

2.15 New Features
==============

As of version 2.15, ElevateDB is now capable of handling both ANSI and Unicode sessions without requiring separate compiled ANSI and Unicode executables/libraries. Because of this, ElevateDB VCL applications can now also mix ANSI and Unicode sessions in an application. You can now specify the character set to use for the engine via the TEDBEngine CharacterSet property, and the character set to use for each session via the TEDBSession CharacterSet (overrides the engine property setting).

Unicode Fix Utility
------------------------

Included with the 2.15 release of this installation in the:

<InstallDir>\utils\edbfixunicode\win32

installation directory is a utility called edbfixunicode.exe. You should run this utility after installing the 2.15 release. Doing so will cause any server information in the Unicode settings file (edbsrvr.ini) to be merged into the ANSI settings file for the ElevateDB Server, marking the server information as ANSI or Unicode as needed. Even if a Unicode settings file does not exist, this utility will make sure to mark all server information as ANSI. This is necessary since the ElevateDB Server now defaults to using the Unicode character set until the character set setting is manually changed.

The ElevateDB Server settings files are stored in the following locations:

Windows 2000, XP, and 2003 Server
-------------------------------------------------

ANSI
C:\Documents and Settings\All Users\Application Data\Elevate Software\ElevateDB Server

Unicode
C:\Documents and Settings\All Users\Application Data\Elevate Software\ElevateDB Server (Unicode)

Windows Vista and Higher (Including Windows 7 and 2008)
-------------------------------------------------------------------------------

ANSI
C:\ProgramData\Elevate Software\ElevateDB Server

Unicode
C:\ProgramData\Elevate Software\ElevateDB Server (Unicode)

As of 2.15, the ElevateDB Server always stores its settings in the non-Unicode (ANSI) location.

Running the Unicode Fix Utility
-----------------------------------------

The syntax for the edbfixunicode utility is:

edbfixunicode [overwrite]

The only parameter is the overwrite parameter, and specifying this parameter will cause any duplicate server information in the ANSI settings file to be overwritten with the server information from the Unicode settings file.

You must run the edbfixunicode utility as an Administrator, especially if you are running it from a command window under Windows Vista or higher. If you run the utility as a normal user, it will not complete properly due to insufficient access permissions.

How the Unicode Fix Utility Works
---------------------------------------------

The edbfixunicode utility behaves in the following way:

If a Unicode settings file (edbsrvr.ini) exists, and an ANSI settings file does not exist, then the Unicode settings file is copied into the location of the ANSI settings file, and the server information is marked with the appropriate character set.

If both a Unicode and ANSI settings file exists, then the Unicode server information is merged with the ANSI server information, with all server information being marked with the appropriate character set. If the overwrite parameter is used with the utility, then any existing ANSI server information will be overwritten if the same server name exists in the Unicode server information.

If only an ANSI settings file exists, then the server information is marked with the appropriate character set.
 If you run the utility more than once, you won't do any damage. However, do not re-run the utility after making further changes to the server information. Doing so will risk the possibility of overwriting your changes with the information from the Unicode settings file.

Tim Young
Elevate Software
www.elevatesoft.com
Image