Hi
I'm Using Merge Replication to replicate info from a Pocket PC app. This
info must be integrated with legacy systems in FOXPRO. Is there a way to
obtain changes (new rows and updated rows) in tables to pass it by textfile
to these legacy systems?
For now, i'm experimenting with a status Column in each table. When
inserting or updating in SQLCE i update this column to 0. Once i replicate I
update it to 1(in the pocket). In the server, a memory resident program is
running every two minutes checking for new records (status=0) and exporting
them to a textfile. This, even when functional, i don't think is the best way
to do it. So I ask you if this can be done by a native way in SQL.
Thank you
Regards!
Omar Rojas
It has been a little while since I've used Merge Replication from a CE-based
device, and I'm a little vague on the restrictions but:
Although ugly and possibly undesirable, a trigger on each table to be
tracked could be used to "catch" changes. it could possible update a
"control" table of table name and key values to be processed later by a
formatter that writes the text file, or other, really quick and simple
processing.
You could get trickier and delve into the replication metadata to capture
this information and avoid the triggers, but that requires a relatively
in-depth understanding of the internals of replication.
Cheers.
"Omar Rojas" wrote:
> Hi
> I'm Using Merge Replication to replicate info from a Pocket PC app. This
> info must be integrated with legacy systems in FOXPRO. Is there a way to
> obtain changes (new rows and updated rows) in tables to pass it by textfile
> to these legacy systems?
> For now, i'm experimenting with a status Column in each table. When
> inserting or updating in SQLCE i update this column to 0. Once i replicate I
> update it to 1(in the pocket). In the server, a memory resident program is
> running every two minutes checking for new records (status=0) and exporting
> them to a textfile. This, even when functional, i don't think is the best way
> to do it. So I ask you if this can be done by a native way in SQL.
> Thank you
> Regards!
> Omar Rojas
2012年3月20日星期二
2012年2月9日星期四
ANSI to Unicode(MSSQL) convertions
Hi,
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL
> Now
not
>|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/e...000.a
sp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/defaul...KB;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/defaul...KB;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL
> Now
not
>|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/e...000.a
sp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/defaul...KB;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/defaul...KB;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
ANSI to Unicode(MSSQL) convertions
Hi,
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.
Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>
|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>
|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your[vbcol=seagreen]
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL[vbcol=seagreen]
> Now
not
>
|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/en...server2000.asp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/default...B;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/default...B;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>
|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>
|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.
Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>
|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>
|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your[vbcol=seagreen]
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL[vbcol=seagreen]
> Now
not
>
|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/en...server2000.asp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/default...B;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/default...B;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>
|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>
|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
ANSI to Unicode(MSSQL) convertions
Hi,
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL[vbcol=seagreen]
> Now
not[vbcol=seagreen]
>|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/e...000.a
sp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/defaul...KB;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/defaul...KB;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
How to convert and transfer ANSI string data from FoxPro table to MS SQL
Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
result is like " 100 ".The ODBC driver does not
performs the conversion from ANSI to Unicode.
Help.Does STRCONV() help?
-Anders
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows). Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
Nevertheless, Activex script mechanism doesn't allow codepage translations,
as I was explained here some time ago. You probably need to add some VB /
VB.NET code to your DTS package. Of course, if you do need to translate your
strings.
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Hi,
> How to convert and transfer ANSI string data from FoxPro table to MS SQL
> Unicode table. Data in FoxPro are in 1251 codepage (Russian Windows).
Now
> result is like " 100 ".The ODBC driver does not
> performs the conversion from ANSI to Unicode.
> Help.
>|||Thanks Nick,
What functions I can use for string translation?
"Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
news:35r898F4pjkqgU1@.individual.net...
> MS SQL usually stores data in CP-1251 for ru_RU locale by default. Your
> example here reads as "compressor ring 100 milimeters" in CP-1251 in fact.
> Nevertheless, Activex script mechanism doesn't allow codepage
translations,
> as I was explained here some time ago. You probably need to add some VB /
> VB.NET code to your DTS package. Of course, if you do need to translate
your
> strings.
> Nick
> "Aras Kucinskas" <aras@.skuba.lt> wrote in message
> news:Ot0I694AFHA.3708@.TK2MSFTNGP14.phx.gbl...
SQL[vbcol=seagreen]
> Now
not[vbcol=seagreen]
>|||SQL Server stores based on the codepage of the database!
For example:
If your client is using codepage 850 and the database 1250 you will have
automatic conversion.
If your client is using having a ASCII variable stored in codepage 850 and
your stored this in a Unicode column on the server, by default this will get
converted to the server side codepage first. You can also convert it to
Unicode on the client first and insert it, in which case it will got in as
is.
Please read:
International Features in Microsoft SQL Server 2000
http://msdn.microsoft.com/library/e...000.a
sp
PRB: SQL Server ODBC Driver Converts Language Events to Unicode (234748)
http://support.microsoft.com/defaul...KB;EN-US;234748
INF: SQL Server 7.0 BCP and Code Page Conversion (199819)
http://support.microsoft.com/defaul...KB;EN-US;199819
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Here follows some portion of a VB.NET code provided "as is" with absolutely
no warranties. Functions translate a string variable from UTF-8 to ASCII
forth and back. Though code says for itself.
--Quote
Imports System.Text
Public utf8 As Encoding = utf8.UTF8
Public ascii As Encoding = ascii.Default
Public Function Utf8ToAscii(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
utf8.GetString(ascii.GetBytes(DataString))
End Function
Public Function AsciiToUtf8(ByVal DataString As String) As String
If DataString = "" Then Return "" Else Return
ascii.GetString(utf8.GetBytes(DataString))
End Function
--Unquote
HTH
Nick
"Aras Kucinskas" <aras@.skuba.lt> wrote in message
news:O094iWDBFHA.2112@.TK2MSFTNGP09.phx.gbl...
> Thanks Nick,
> What functions I can use for string translation?
> "Nikolai Lukin" <nvlukin@.gran-service.ru> wrote in message
> news:35r898F4pjkqgU1@.individual.net...
> translations,
> your
> SQL
> not
>|||Sorry, this should read as:
> Imports System.Text
> Public utf8 As Encoding = utf8.UTF8
> Public ascii As Encoding = ascii.Default
> Public Function Utf8ToAscii(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> utf8.GetString(ascii.GetBytes(DataString))
> End Function
> Public Function AsciiToUtf8(ByVal DataString As String) As String
> If DataString = "" Then Return "" Else Return
> ascii.GetString(utf8.GetBytes(DataString))
> End Function
Nick
订阅:
博文 (Atom)