Hello, I install SDAC 6.2.8 Trial on Delphi XE2 Update 4 Hotfix 1.
I use TMSLoader, and PutColumnData(...) save only first character of string or saved it in wrong encoding.
I use this code:
FConnection: TMSConnection;
FLoader: TMSLoader;
..
FConnection.Authentication := auWindows
FConnection.LoginPrompt := False;
FConnection.Server := ConnectionString;
FConnection.Database := SchemaName;
FConnection.Open;
FLoader := TMSLoader.Create(nil);
FLoader.Connection := Connection;
FLoader.TableName := TableName;
FLoader.CreateColumns;
Table definition is:
CREATE TABLE TABLE_FOR_LOADING (
CALLER_NUMBER varchar(100),
SERVICE_DATE_TIME DATETIME,
CALLED_NUMBER varchar(100),
...
SQL Server 2008 R2 Express.
Before I use ODAC, and it works fine.
Please help me.
Dmitry.
TMSLoader 6.2.8 Trial save wrong string parameters
Re: TMSLoader 6.2.8 Trial save wrong string parameters
I compile and run Demo application in Delphi XE2 and got the same effect.
I think it encountered zero byte in unicode string and breaks. When I send cyrilic string, it write more than one char, but saved text is wrong (not-readable wrong encoding text).
I compile Demo application in Delphi 7, and it works fine.
Please help, I need working Delphi XE2 code.
I think it encountered zero byte in unicode string and breaks. When I send cyrilic string, it write more than one char, but saved text is wrong (not-readable wrong encoding text).
I compile Demo application in Delphi 7, and it works fine.
Please help, I need working Delphi XE2 code.
I found, it save Unicode as single-byte encoded values.
After some investigations I found that unicode values saved as single-byte encoding. I have LEN(c)=22 instead of 11 in the source.
MS SQL Server Management studio can see only part of value (up to first zero in Unicode).
Please give me workaround or fix this bug, and I will buy it.
Thanks,
Dmitry.
MS SQL Server Management studio can see only part of value (up to first zero in Unicode).
Please give me workaround or fix this bug, and I will buy it.
Thanks,
Dmitry.
Re: TMSLoader 6.2.8 Trial save wrong string parameters
I found workaround. if VarType(Value)=varString it works, but varUString don't works.
Workaround is:
it is ugly, but works.
Workaround is:
Code: Select all
if VarType(Value)=varUString then
FLoader.PutColumnData(ColName, FRowIndex, AnsiString(VarToStr(Value)))
else
FLoader.PutColumnData(ColName, FRowIndex, Value);
Re: TMSLoader 6.2.8 Trial save wrong string parameters
Thank you for the information. We have reproduced this problem. We will fix this problem in the next SDAC build. For the time being you can use your workaround, it is correct.
Re: TMSLoader 6.2.8 Trial save wrong string parameters
We have fixed this problem. This fix will be included in the next SDAC build.