Showing posts with label insert. Show all posts
Showing posts with label insert. Show all posts

Thursday, March 29, 2012

Hong kong fonts

I am using sql server 2000 english
Once i insert chinese font, it is ok
But when I insert one hong kong font, then it make whole chinese font
crack...
But when i copy whole message and update(not insert), then the text can be
shown
is it microsoft bug?Izumi,
It is difficult to know, because you have not provided much information.
If you are inserting Simplified Chinese characters in GB encoding and
Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
code page support only for GB and not Big-5.
If you can use Unicode in all cases, it should be possible to handle
both character sets.
Please tell us the data type of the column (probably varchar, nvarchar,
text, or ntext) how you are inserting data. INSERT query, or data file
import, or typing in Enterprise Manager or some tool? Also, how do you
do the update? If you specify character strings in a query, do you use
N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
It could also be a bug, and the additional information will help.
SK
izumi wrote:
>I am using sql server 2000 english
>Once i insert chinese font, it is ok
>But when I insert one hong kong font, then it make whole chinese font
>crack...
>But when i copy whole message and update(not insert), then the text can be
>shown
>is it microsoft bug?
>
>|||Good, I find the good person to solve the problem
u really understand my story
ok
let me explain
ASP page to insert and update the character to sql server
It is not GB
It is Big5 actually
but there are around 5000 Hong Kong words which is not Big5
so we need some additional hong kong character set to recongize some hong
kong words
http://www.microsoft.com/hk/hkscs/default.asp
you can see the details
The word I cannot insert is one out of 5000
sure I use N'...in asp page
And i use nvarchar for data type
it is unicode
that what I said it was running well before
but for special hong kong character
when insert, the words is crack
when update hong kong character, it is running well, no crack
"Steve Kass" <skass@.drew.edu> wrote in message
news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> Izumi,
> It is difficult to know, because you have not provided much information.
> If you are inserting Simplified Chinese characters in GB encoding and
> Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
> code page support only for GB and not Big-5.
> If you can use Unicode in all cases, it should be possible to handle
> both character sets.
> Please tell us the data type of the column (probably varchar, nvarchar,
> text, or ntext) how you are inserting data. INSERT query, or data file
> import, or typing in Enterprise Manager or some tool? Also, how do you
> do the update? If you specify character strings in a query, do you use
> N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> It could also be a bug, and the additional information will help.
> SK
> izumi wrote:
> >I am using sql server 2000 english
> >
> >Once i insert chinese font, it is ok
> >
> >But when I insert one hong kong font, then it make whole chinese font
> >crack...
> >
> >But when i copy whole message and update(not insert), then the text can
be
> >shown
> >
> >is it microsoft bug?
> >
> >
> >
> >
>|||Izumi,
Do you update from the asp page also? If insert and update are both
from asp page, but insert does not work, I'm not sure what the problem is.
What codepage does your asp page expect for input? Supplementary Hong
Kong character set is a new code page, 951.
SK
izumi wrote:
>Good, I find the good person to solve the problem
>u really understand my story
>ok
>let me explain
>ASP page to insert and update the character to sql server
>It is not GB
>It is Big5 actually
>but there are around 5000 Hong Kong words which is not Big5
>so we need some additional hong kong character set to recongize some hong
>kong words
>http://www.microsoft.com/hk/hkscs/default.asp
>you can see the details
>The word I cannot insert is one out of 5000
>sure I use N'...in asp page
>And i use nvarchar for data type
>it is unicode
>that what I said it was running well before
>but for special hong kong character
>when insert, the words is crack
>when update hong kong character, it is running well, no crack
>
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
>
>>Izumi,
>>It is difficult to know, because you have not provided much information.
>>If you are inserting Simplified Chinese characters in GB encoding and
>>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
>>code page support only for GB and not Big-5.
>>If you can use Unicode in all cases, it should be possible to handle
>>both character sets.
>>Please tell us the data type of the column (probably varchar, nvarchar,
>>text, or ntext) how you are inserting data. INSERT query, or data file
>>import, or typing in Enterprise Manager or some tool? Also, how do you
>>do the update? If you specify character strings in a query, do you use
>>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
>>It could also be a bug, and the additional information will help.
>>SK
>>izumi wrote:
>>
>>I am using sql server 2000 english
>>Once i insert chinese font, it is ok
>>But when I insert one hong kong font, then it make whole chinese font
>>crack...
>>But when i copy whole message and update(not insert), then the text can
>>
>be
>
>>shown
>>is it microsoft bug?
>>
>>
>>
>
>|||good point
i am using 950
let me try 951
sure both method is doing on Asp
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
> Izumi,
> Do you update from the asp page also? If insert and update are both
> from asp page, but insert does not work, I'm not sure what the problem
is.
> What codepage does your asp page expect for input? Supplementary Hong
> Kong character set is a new code page, 951.
> SK
>
> izumi wrote:
> >Good, I find the good person to solve the problem
> >u really understand my story
> >
> >ok
> >let me explain
> >ASP page to insert and update the character to sql server
> >It is not GB
> >It is Big5 actually
> >but there are around 5000 Hong Kong words which is not Big5
> >so we need some additional hong kong character set to recongize some hong
> >kong words
> >http://www.microsoft.com/hk/hkscs/default.asp
> >you can see the details
> >The word I cannot insert is one out of 5000
> >sure I use N'...in asp page
> >And i use nvarchar for data type
> >it is unicode
> >that what I said it was running well before
> >but for special hong kong character
> >when insert, the words is crack
> >when update hong kong character, it is running well, no crack
> >
> >
> >"Steve Kass" <skass@.drew.edu> wrote in message
> >news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> >
> >
> >>Izumi,
> >>
> >>It is difficult to know, because you have not provided much information.
> >>If you are inserting Simplified Chinese characters in GB encoding and
> >>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
> >>code page support only for GB and not Big-5.
> >>
> >>If you can use Unicode in all cases, it should be possible to handle
> >>both character sets.
> >>
> >>Please tell us the data type of the column (probably varchar, nvarchar,
> >>text, or ntext) how you are inserting data. INSERT query, or data file
> >>import, or typing in Enterprise Manager or some tool? Also, how do you
> >>do the update? If you specify character strings in a query, do you use
> >>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> >>
> >>It could also be a bug, and the additional information will help.
> >>
> >>SK
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>I am using sql server 2000 english
> >>
> >>Once i insert chinese font, it is ok
> >>
> >>But when I insert one hong kong font, then it make whole chinese font
> >>crack...
> >>
> >>But when i copy whole message and update(not insert), then the text can
> >>
> >>
> >be
> >
> >
> >>shown
> >>
> >>is it microsoft bug?
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>|||when i change to <%
Session.CodePage=9511
Response.Charset="big5"
%>
but it show error on asp
rror Type:
SessionID, ASP 0204 (0x80004005)
An invalid CodePage value was specified.
"izumi" <test@.test.com> wrote in message
news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
> good point
> i am using 950
> let me try 951
> sure both method is doing on Asp
> "Steve Kass" <skass@.drew.edu> wrote in message
> news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
> > Izumi,
> >
> > Do you update from the asp page also? If insert and update are both
> > from asp page, but insert does not work, I'm not sure what the problem
> is.
> > What codepage does your asp page expect for input? Supplementary Hong
> > Kong character set is a new code page, 951.
> >
> > SK
> >
> >
> > izumi wrote:
> >
> > >Good, I find the good person to solve the problem
> > >u really understand my story
> > >
> > >ok
> > >let me explain
> > >ASP page to insert and update the character to sql server
> > >It is not GB
> > >It is Big5 actually
> > >but there are around 5000 Hong Kong words which is not Big5
> > >so we need some additional hong kong character set to recongize some
hong
> > >kong words
> > >http://www.microsoft.com/hk/hkscs/default.asp
> > >you can see the details
> > >The word I cannot insert is one out of 5000
> > >sure I use N'...in asp page
> > >And i use nvarchar for data type
> > >it is unicode
> > >that what I said it was running well before
> > >but for special hong kong character
> > >when insert, the words is crack
> > >when update hong kong character, it is running well, no crack
> > >
> > >
> > >"Steve Kass" <skass@.drew.edu> wrote in message
> > >news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> > >
> > >
> > >>Izumi,
> > >>
> > >>It is difficult to know, because you have not provided much
information.
> > >>If you are inserting Simplified Chinese characters in GB encoding and
> > >>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
> > >>code page support only for GB and not Big-5.
> > >>
> > >>If you can use Unicode in all cases, it should be possible to handle
> > >>both character sets.
> > >>
> > >>Please tell us the data type of the column (probably varchar,
nvarchar,
> > >>text, or ntext) how you are inserting data. INSERT query, or data file
> > >>import, or typing in Enterprise Manager or some tool? Also, how do you
> > >>do the update? If you specify character strings in a query, do you use
> > >>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> > >>
> > >>It could also be a bug, and the additional information will help.
> > >>
> > >>SK
> > >>
> > >>izumi wrote:
> > >>
> > >>
> > >>
> > >>I am using sql server 2000 english
> > >>
> > >>Once i insert chinese font, it is ok
> > >>
> > >>But when I insert one hong kong font, then it make whole chinese font
> > >>crack...
> > >>
> > >>But when i copy whole message and update(not insert), then the text
can
> > >>
> > >>
> > >be
> > >
> > >
> > >>shown
> > >>
> > >>is it microsoft bug?
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
>|||Did you type 951 or 9511? I don't have any other good ideas, but I will
mention this question to Microsoft and see what they say.
SK
izumi wrote:
>when i change to <%
>Session.CodePage=9511
>Response.Charset="big5"
>%>
>but it show error on asp
>rror Type:
>SessionID, ASP 0204 (0x80004005)
>An invalid CodePage value was specified.
>"izumi" <test@.test.com> wrote in message
>news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
>
>>good point
>>i am using 950
>>let me try 951
>>sure both method is doing on Asp
>>"Steve Kass" <skass@.drew.edu> wrote in message
>>news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
>>
>>Izumi,
>>Do you update from the asp page also? If insert and update are both
>>from asp page, but insert does not work, I'm not sure what the problem
>>
>>is.
>>
>>What codepage does your asp page expect for input? Supplementary Hong
>>Kong character set is a new code page, 951.
>>SK
>>
>>izumi wrote:
>>
>>Good, I find the good person to solve the problem
>>u really understand my story
>>ok
>>let me explain
>>ASP page to insert and update the character to sql server
>>It is not GB
>>It is Big5 actually
>>but there are around 5000 Hong Kong words which is not Big5
>>so we need some additional hong kong character set to recongize some
>>
>hong
>
>>kong words
>>http://www.microsoft.com/hk/hkscs/default.asp
>>you can see the details
>>The word I cannot insert is one out of 5000
>>sure I use N'...in asp page
>>And i use nvarchar for data type
>>it is unicode
>>that what I said it was running well before
>>but for special hong kong character
>>when insert, the words is crack
>>when update hong kong character, it is running well, no crack
>>
>>"Steve Kass" <skass@.drew.edu> wrote in message
>>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
>>
>>
>>Izumi,
>>It is difficult to know, because you have not provided much
>>
>information.
>
>>If you are inserting Simplified Chinese characters in GB encoding and
>>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you have
>>code page support only for GB and not Big-5.
>>If you can use Unicode in all cases, it should be possible to handle
>>both character sets.
>>Please tell us the data type of the column (probably varchar,
>>
>nvarchar,
>
>>text, or ntext) how you are inserting data. INSERT query, or data file
>>import, or typing in Enterprise Manager or some tool? Also, how do you
>>do the update? If you specify character strings in a query, do you use
>>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
>>It could also be a bug, and the additional information will help.
>>SK
>>izumi wrote:
>>
>>
>>I am using sql server 2000 english
>>Once i insert chinese font, it is ok
>>But when I insert one hong kong font, then it make whole chinese font
>>crack...
>>But when i copy whole message and update(not insert), then the text
>>
>can
>
>>
>>be
>>
>>
>>shown
>>is it microsoft bug?
>>
>>
>>
>>
>>
>>
>>
>
>|||sorry I change to 951
ASP Error
"Steve Kass" <skass@.drew.edu> wrote in message
news:e9fvssR0DHA.832@.TK2MSFTNGP09.phx.gbl...
> Did you type 951 or 9511? I don't have any other good ideas, but I will
> mention this question to Microsoft and see what they say.
> SK
> izumi wrote:
> >when i change to <%
> >Session.CodePage=9511
> >Response.Charset="big5"
> >%>
> >but it show error on asp
> >rror Type:
> >SessionID, ASP 0204 (0x80004005)
> >An invalid CodePage value was specified.
> >"izumi" <test@.test.com> wrote in message
> >news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
> >
> >
> >>good point
> >>i am using 950
> >>let me try 951
> >>
> >>sure both method is doing on Asp
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
> >>
> >>
> >>Izumi,
> >>
> >>Do you update from the asp page also? If insert and update are both
> >>from asp page, but insert does not work, I'm not sure what the problem
> >>
> >>
> >>is.
> >>
> >>
> >>What codepage does your asp page expect for input? Supplementary Hong
> >>Kong character set is a new code page, 951.
> >>
> >>SK
> >>
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>Good, I find the good person to solve the problem
> >>u really understand my story
> >>
> >>ok
> >>let me explain
> >>ASP page to insert and update the character to sql server
> >>It is not GB
> >>It is Big5 actually
> >>but there are around 5000 Hong Kong words which is not Big5
> >>so we need some additional hong kong character set to recongize some
> >>
> >>
> >hong
> >
> >
> >>kong words
> >>http://www.microsoft.com/hk/hkscs/default.asp
> >>you can see the details
> >>The word I cannot insert is one out of 5000
> >>sure I use N'...in asp page
> >>And i use nvarchar for data type
> >>it is unicode
> >>that what I said it was running well before
> >>but for special hong kong character
> >>when insert, the words is crack
> >>when update hong kong character, it is running well, no crack
> >>
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> >>
> >>
> >>
> >>
> >>Izumi,
> >>
> >>It is difficult to know, because you have not provided much
> >>
> >>
> >information.
> >
> >
> >>If you are inserting Simplified Chinese characters in GB encoding and
> >>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you
have
> >>code page support only for GB and not Big-5.
> >>
> >>If you can use Unicode in all cases, it should be possible to handle
> >>both character sets.
> >>
> >>Please tell us the data type of the column (probably varchar,
> >>
> >>
> >nvarchar,
> >
> >
> >>text, or ntext) how you are inserting data. INSERT query, or data
file
> >>import, or typing in Enterprise Manager or some tool? Also, how do
you
> >>do the update? If you specify character strings in a query, do you
use
> >>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> >>
> >>It could also be a bug, and the additional information will help.
> >>
> >>SK
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>
> >>
> >>I am using sql server 2000 english
> >>
> >>Once i insert chinese font, it is ok
> >>
> >>But when I insert one hong kong font, then it make whole chinese
font
> >>crack...
> >>
> >>But when i copy whole message and update(not insert), then the text
> >>
> >>
> >can
> >
> >
> >>
> >>
> >>be
> >>
> >>
> >>
> >>
> >>shown
> >>
> >>is it microsoft bug?
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>|||Ok lets wait
I will call our users to use update function
that mean insert something rubbish, and then update that row of data.
Thanks
"Steve Kass" <skass@.drew.edu> wrote in message
news:e9fvssR0DHA.832@.TK2MSFTNGP09.phx.gbl...
> Did you type 951 or 9511? I don't have any other good ideas, but I will
> mention this question to Microsoft and see what they say.
> SK
> izumi wrote:
> >when i change to <%
> >Session.CodePage=9511
> >Response.Charset="big5"
> >%>
> >but it show error on asp
> >rror Type:
> >SessionID, ASP 0204 (0x80004005)
> >An invalid CodePage value was specified.
> >"izumi" <test@.test.com> wrote in message
> >news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
> >
> >
> >>good point
> >>i am using 950
> >>let me try 951
> >>
> >>sure both method is doing on Asp
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
> >>
> >>
> >>Izumi,
> >>
> >>Do you update from the asp page also? If insert and update are both
> >>from asp page, but insert does not work, I'm not sure what the problem
> >>
> >>
> >>is.
> >>
> >>
> >>What codepage does your asp page expect for input? Supplementary Hong
> >>Kong character set is a new code page, 951.
> >>
> >>SK
> >>
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>Good, I find the good person to solve the problem
> >>u really understand my story
> >>
> >>ok
> >>let me explain
> >>ASP page to insert and update the character to sql server
> >>It is not GB
> >>It is Big5 actually
> >>but there are around 5000 Hong Kong words which is not Big5
> >>so we need some additional hong kong character set to recongize some
> >>
> >>
> >hong
> >
> >
> >>kong words
> >>http://www.microsoft.com/hk/hkscs/default.asp
> >>you can see the details
> >>The word I cannot insert is one out of 5000
> >>sure I use N'...in asp page
> >>And i use nvarchar for data type
> >>it is unicode
> >>that what I said it was running well before
> >>but for special hong kong character
> >>when insert, the words is crack
> >>when update hong kong character, it is running well, no crack
> >>
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> >>
> >>
> >>
> >>
> >>Izumi,
> >>
> >>It is difficult to know, because you have not provided much
> >>
> >>
> >information.
> >
> >
> >>If you are inserting Simplified Chinese characters in GB encoding and
> >>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you
have
> >>code page support only for GB and not Big-5.
> >>
> >>If you can use Unicode in all cases, it should be possible to handle
> >>both character sets.
> >>
> >>Please tell us the data type of the column (probably varchar,
> >>
> >>
> >nvarchar,
> >
> >
> >>text, or ntext) how you are inserting data. INSERT query, or data
file
> >>import, or typing in Enterprise Manager or some tool? Also, how do
you
> >>do the update? If you specify character strings in a query, do you
use
> >>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> >>
> >>It could also be a bug, and the additional information will help.
> >>
> >>SK
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>
> >>
> >>I am using sql server 2000 english
> >>
> >>Once i insert chinese font, it is ok
> >>
> >>But when I insert one hong kong font, then it make whole chinese
font
> >>crack...
> >>
> >>But when i copy whole message and update(not insert), then the text
> >>
> >>
> >can
> >
> >
> >>
> >>
> >>be
> >>
> >>
> >>
> >>
> >>shown
> >>
> >>is it microsoft bug?
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>|||izumi,
If you speak Chinese, you might find some help by posting your
question to the newsgroup microsoft.cn.iis.asp. There is also a
Japanese inetserver.asp group and several English newsgroups under
microsoft.public.dotnet.framework.aspnet.
Steve
izumi wrote:
>Ok lets wait
>I will call our users to use update function
>that mean insert something rubbish, and then update that row of data.
>Thanks
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:e9fvssR0DHA.832@.TK2MSFTNGP09.phx.gbl...
>
>>Did you type 951 or 9511? I don't have any other good ideas, but I will
>>mention this question to Microsoft and see what they say.
>>SK
>>izumi wrote:
>>
>>when i change to <%
>>Session.CodePage=9511
>>Response.Charset="big5"
>>%>
>>but it show error on asp
>>rror Type:
>>SessionID, ASP 0204 (0x80004005)
>>An invalid CodePage value was specified.
>>"izumi" <test@.test.com> wrote in message
>>news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
>>
>>
>>good point
>>i am using 950
>>let me try 951
>>sure both method is doing on Asp
>>"Steve Kass" <skass@.drew.edu> wrote in message
>>news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
>>
>>
>>Izumi,
>>Do you update from the asp page also? If insert and update are both
>>
>>from asp page, but insert does not work, I'm not sure what the problem
>>
>>
>>is.
>>
>>
>>What codepage does your asp page expect for input? Supplementary Hong
>>Kong character set is a new code page, 951.
>>SK
>>
>>izumi wrote:
>>
>>
>>Good, I find the good person to solve the problem
>>u really understand my story
>>ok
>>let me explain
>>ASP page to insert and update the character to sql server
>>It is not GB
>>It is Big5 actually
>>but there are around 5000 Hong Kong words which is not Big5
>>so we need some additional hong kong character set to recongize some
>>
>>
>>hong
>>
>>
>>kong words
>>http://www.microsoft.com/hk/hkscs/default.asp
>>you can see the details
>>The word I cannot insert is one out of 5000
>>sure I use N'...in asp page
>>And i use nvarchar for data type
>>it is unicode
>>that what I said it was running well before
>>but for special hong kong character
>>when insert, the words is crack
>>when update hong kong character, it is running well, no crack
>>
>>"Steve Kass" <skass@.drew.edu> wrote in message
>>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
>>
>>
>>
>>>Izumi,
>>>
>>>It is difficult to know, because you have not provided much
>>>
>>>
>>>
>>>
>>information.
>>
>>
>>>If you are inserting Simplified Chinese characters in GB encoding and
>>>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you
>>>
>>>
>have
>
>>>code page support only for GB and not Big-5.
>>>
>>>If you can use Unicode in all cases, it should be possible to handle
>>>both character sets.
>>>
>>>Please tell us the data type of the column (probably varchar,
>>>
>>>
>>>
>>>
>>nvarchar,
>>
>>
>>>text, or ntext) how you are inserting data. INSERT query, or data
>>>
>>>
>file
>
>>>import, or typing in Enterprise Manager or some tool? Also, how do
>>>
>>>
>you
>
>>>do the update? If you specify character strings in a query, do you
>>>
>>>
>use
>
>>>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
>>>
>>>It could also be a bug, and the additional information will help.
>>>
>>>SK
>>>
>>>izumi wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>I am using sql server 2000 english
>>>
>>>Once i insert chinese font, it is ok
>>>
>>>But when I insert one hong kong font, then it make whole chinese
>>>
>>>
>font
>
>>>crack...
>>>
>>>But when i copy whole message and update(not insert), then the text
>>>
>>>
>>>
>>>
>>can
>>
>>
>>>
>>>
>>be
>>
>>
>>
>>>shown
>>>
>>>is it microsoft bug?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>|||I am pure Hong kong guy
anyway
thanks for your help
but i would like to wait microsoft's reply from your side......
if any update, can u send to hokalun@.netvigator.com
Thanks a lot
"Steve Kass" <skass@.drew.edu> ¦b¶l¥ó
news:urZwI8N1DHA.2480@.TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
> izumi,
> If you speak Chinese, you might find some help by posting your
> question to the newsgroup microsoft.cn.iis.asp. There is also a
> Japanese inetserver.asp group and several English newsgroups under
> microsoft.public.dotnet.framework.aspnet.
> Steve
> izumi wrote:
> >Ok lets wait
> >I will call our users to use update function
> >that mean insert something rubbish, and then update that row of data.
> >
> >Thanks
> >"Steve Kass" <skass@.drew.edu> wrote in message
> >news:e9fvssR0DHA.832@.TK2MSFTNGP09.phx.gbl...
> >
> >
> >>Did you type 951 or 9511? I don't have any other good ideas, but I will
> >>mention this question to Microsoft and see what they say.
> >>
> >>SK
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>when i change to <%
> >>Session.CodePage=9511
> >>Response.Charset="big5"
> >>%>
> >>but it show error on asp
> >>rror Type:
> >>SessionID, ASP 0204 (0x80004005)
> >>An invalid CodePage value was specified.
> >>"izumi" <test@.test.com> wrote in message
> >>news:OtkahXQ0DHA.1700@.TK2MSFTNGP12.phx.gbl...
> >>
> >>
> >>
> >>
> >>good point
> >>i am using 950
> >>let me try 951
> >>
> >>sure both method is doing on Asp
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:%23n5KoLQ0DHA.3116@.TK2MSFTNGP11.phx.gbl...
> >>
> >>
> >>
> >>
> >>Izumi,
> >>
> >>Do you update from the asp page also? If insert and update are both
> >>
> >>
> >>from asp page, but insert does not work, I'm not sure what the
problem
> >>
> >>
> >>
> >>
> >>is.
> >>
> >>
> >>
> >>
> >>What codepage does your asp page expect for input? Supplementary
Hong
> >>Kong character set is a new code page, 951.
> >>
> >>SK
> >>
> >>
> >>izumi wrote:
> >>
> >>
> >>
> >>
> >>
> >>Good, I find the good person to solve the problem
> >>u really understand my story
> >>
> >>ok
> >>let me explain
> >>ASP page to insert and update the character to sql server
> >>It is not GB
> >>It is Big5 actually
> >>but there are around 5000 Hong Kong words which is not Big5
> >>so we need some additional hong kong character set to recongize some
> >>
> >>
> >>
> >>
> >>hong
> >>
> >>
> >>
> >>
> >>kong words
> >>http://www.microsoft.com/hk/hkscs/default.asp
> >>you can see the details
> >>The word I cannot insert is one out of 5000
> >>sure I use N'...in asp page
> >>And i use nvarchar for data type
> >>it is unicode
> >>that what I said it was running well before
> >>but for special hong kong character
> >>when insert, the words is crack
> >>when update hong kong character, it is running well, no crack
> >>
> >>
> >>"Steve Kass" <skass@.drew.edu> wrote in message
> >>news:uFMQzcP0DHA.604@.tk2msftngp13.phx.gbl...
> >>
> >>
> >>
> >>
> >>
> >>
> >>>Izumi,
> >>>
> >>>It is difficult to know, because you have not provided much
> >>>
> >>>
> >>>
> >>>
> >>information.
> >>
> >>
> >>
> >>
> >>>If you are inserting Simplified Chinese characters in GB encoding
and
> >>>Traditional (Hong Kong) characters in Big-5 encoding, perhaps you
> >>>
> >>>
> >have
> >
> >
> >>>code page support only for GB and not Big-5.
> >>>
> >>>If you can use Unicode in all cases, it should be possible to
handle
> >>>both character sets.
> >>>
> >>>Please tell us the data type of the column (probably varchar,
> >>>
> >>>
> >>>
> >>>
> >>nvarchar,
> >>
> >>
> >>
> >>
> >>>text, or ntext) how you are inserting data. INSERT query, or data
> >>>
> >>>
> >file
> >
> >
> >>>import, or typing in Enterprise Manager or some tool? Also, how do
> >>>
> >>>
> >you
> >
> >
> >>>do the update? If you specify character strings in a query, do you
> >>>
> >>>
> >use
> >
> >
> >>>N'ÄãµÄºº×Ö' or 'ÄãµÄºº×Ö' (is there N or not for Unicode)?
> >>>
> >>>It could also be a bug, and the additional information will help.
> >>>
> >>>SK
> >>>
> >>>izumi wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>I am using sql server 2000 english
> >>>
> >>>Once i insert chinese font, it is ok
> >>>
> >>>But when I insert one hong kong font, then it make whole chinese
> >>>
> >>>
> >font
> >
> >
> >>>crack...
> >>>
> >>>But when i copy whole message and update(not insert), then the
text
> >>>
> >>>
> >>>
> >>>
> >>can
> >>
> >>
> >>
> >>
> >>>
> >>>
> >>be
> >>
> >>
> >>
> >>
> >>
> >>
> >>>shown
> >>>
> >>>is it microsoft bug?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>

Tuesday, March 27, 2012

History table

Hi I wanted to create a history table, but it doesn′t really works:
CREATE TRIGGER [Helpdesk_History_Copy] ON [dbo].[Helpdesk]
FOR INSERT, UPDATE AS
INSERT into dbo.Helpdesk_History
(
Helpdesk_History.Computer_Idn,
Helpdesk_History.DeviceName,
Helpdesk_History.InsertDate,
Helpdesk_History.ProblemTitle,
Helpdesk_History.Duration,
Helpdesk_History.ProblemDetails,
Helpdesk_History.ProblemSolution,
Helpdesk_History.CallDispatcher,
Helpdesk_History.Responsible,
Helpdesk_History.Status
)
SELECT
Helpdesk.Computer_Idn,
Helpdesk.DeviceName,
Helpdesk.InsertDate,
Helpdesk.ProblemTitle,
Helpdesk.Duration,
Helpdesk.ProblemDetails,
Helpdesk.ProblemSolution,
Helpdesk.CallDispatcher,
Helpdesk.Responsible,
Helpdesk.Status
from Helpdesk
With my trigger all values will be written in the helpdesk_history table.
But I want that only new oder changed collums will should be insert in the
history table.
Any idea ?
Thx
WolfgangI think this is what you want
CREATE TRIGGER [Helpdesk_History_Copy] ON [dbo].[Helpdesk]
FOR INSERT, UPDATE AS
INSERT into dbo.Helpdesk_History
(
Helpdesk_History.Computer_Idn,
Helpdesk_History.DeviceName,
Helpdesk_History.InsertDate,
Helpdesk_History.ProblemTitle,
Helpdesk_History.Duration,
Helpdesk_History.ProblemDetails,
Helpdesk_History.ProblemSolution,
Helpdesk_History.CallDispatcher,
Helpdesk_History.Responsible,
Helpdesk_History.Status
)
SELECT
d.Computer_Idn,
d.DeviceName,
d.InsertDate, -- this would probably be getdate() if you want
today's date
d.ProblemTitle,
d.Duration,
d.ProblemDetails,
d.ProblemSolution,
d.CallDispatcher,
d.Responsible,
d.Status
from deleted d
http://sqlservercode.blogspot.com/|||Hi in case of update this works perfect,
but if I insert a new record the complete table helpdesk will be copied to
the helpdesk_history table.
Any idea?
thx
Wolfgang
"SQL" wrote:

> I think this is what you want
> CREATE TRIGGER [Helpdesk_History_Copy] ON [dbo].[Helpdesk]
> FOR INSERT, UPDATE AS
> INSERT into dbo.Helpdesk_History
>
> (
> Helpdesk_History.Computer_Idn,
> Helpdesk_History.DeviceName,
> Helpdesk_History.InsertDate,
> Helpdesk_History.ProblemTitle,
> Helpdesk_History.Duration,
> Helpdesk_History.ProblemDetails,
> Helpdesk_History.ProblemSolution,
> Helpdesk_History.CallDispatcher,
> Helpdesk_History.Responsible,
> Helpdesk_History.Status
> )
> SELECT
>
> d.Computer_Idn,
> d.DeviceName,
> d.InsertDate, -- this would probably be getdate() if you want
> today's date
> d.ProblemTitle,
> d.Duration,
> d.ProblemDetails,
> d.ProblemSolution,
> d.CallDispatcher,
> d.Responsible,
> d.Status
>
> from deleted d
>
> http://sqlservercode.blogspot.com/
>|||When you do an insert the deleted table should not be available
Is there possible another trigger on the table that updates after
inserting?
http://sqlservercode.blogspot.com/|||Hi Wolfgang !
That would mean to build a block of code, comparing each column to the
new one, and keeping the information that this value was changed and
then issueing something like a dynamic sql statement, to only store the
information that were changed.
HTH, Jens Suessmeyer.|||Hi,
yes there is another trigger:
CREATE TRIGGER [Computer_idn] ON dbo.Helpdesk
FOR INSERT
AS
UPDATE Helpdesk SET Computer_idn =
(Select Computer.Computer_idn
from Computer
where
computer.devicename = helpdesk.devicename
and computer.SWLastScanDate =
(SELECT MAX(computer.SWLastScanDate) FROM computer))
This trigger updates the Computer_Idn ...and with this trigger it updates
the whole table. How can I change this trigger that only the Computer_Idn of
the new inserted value will be updated ?
Thanks
Wolfgang
"SQL" wrote:

> When you do an insert the deleted table should not be available
> Is there possible another trigger on the table that updates after
> inserting?
> http://sqlservercode.blogspot.com/
>|||On Wed, 9 Nov 2005 00:10:11 -0800, Wolfgang Dausend wrote:

>Hi,
>yes there is another trigger:
>
>CREATE TRIGGER [Computer_idn] ON dbo.Helpdesk
>FOR INSERT
>AS
>UPDATE Helpdesk SET Computer_idn =
>(Select Computer.Computer_idn
>from Computer
>where
>computer.devicename = helpdesk.devicename
>and computer.SWLastScanDate =
>(SELECT MAX(computer.SWLastScanDate) FROM computer))
>
>This trigger updates the Computer_Idn ...and with this trigger it updates
>the whole table. How can I change this trigger that only the Computer_Idn o
f
>the new inserted value will be updated ?
Hi Wolfgang,
Add
WHERE EXISTS
(SELECT *
FROM inserted
WHERE inserted.WhateverYourKeyIs = Helpdesk.WhateverYourKeyIs)
at the end of the UPDATE statement.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Friday, March 23, 2012

high-speed insert

I have been using an OODB as the repository for a stock-quote ticker plant.
I would love to be able to convert this to SQL Server.
Quotes come in at a nominal rate of 10K per second with peaks up to 60K.
The quote is fairly basic data: time, price, volume, ExchangeID - leaving ou
t
the minor variations. I already have this data in a write cache in C#, so
the data could be cached per stock symbol. While this data is flying in, I
also will be querying a bit heavily also.
1) Is this even thinkable with SQL Server 2005 Express, Standard or
Enterprise?
2) I haven't had much luck with good ole Google in finding some direction.
I'm obviously not a SQLServer expert, but given a pointer towards the write
technology and methods, I might have hope.
3) There is a major Stock Trading Technology company that says they use SQL
Server 2005 for this purpose. Of course, they don't describe the methods.
This is at
http://members.microsoft.com/Custom...1&LanguageID=1.
Thanks for any help you might provideLarry wrote:
> I have been using an OODB as the repository for a stock-quote ticker
> plant.
> I would love to be able to convert this to SQL Server.
> Quotes come in at a nominal rate of 10K per second with peaks up to
> 60K.
> The quote is fairly basic data: time, price, volume, ExchangeID -
> leaving out the minor variations. I already have this data in a
> write cache in C#, so the data could be cached per stock symbol.
> While this data is flying in, I also will be querying a bit heavily
> also.
> 1) Is this even thinkable with SQL Server 2005 Express, Standard or
> Enterprise?
> 2) I haven't had much luck with good ole Google in finding some
> direction. I'm obviously not a SQLServer expert, but given a pointer
> towards the write technology and methods, I might have hope.
> 3) There is a major Stock Trading Technology company that says they
> use SQL Server 2005 for this purpose. Of course, they don't describe
> the methods. This is at
> http://members.microsoft.com/Custom...1&LanguageID=1.
> Thanks for any help you might provide
With the right hardware, the right multi-threaded application, and the
right database design, you could do it. I don't know that C# would be my
first choice for that type of application performance. C/C++ will likely
yield better performance. You'll likely need a multi-threaded app,
persistent connections, stored procedures, fast hardware and a properly
designed disk-subsystem. What is the querying for?
This type of project will require careful planning and design. You
should definitely enlist resources who have done this before, since even
the smallest mistake can cause problems.
http://www.microsoft.com/sql/prodin...calability.mspx
David Gugick - SQL Server MVP
Quest Software|||If your requirement is to insert the raw quote data, I suggest you look into
the SqlBulkCopy class, introduced in .NET 2.0. This ought to be able to
insert at a rate of tens-of-thousands of rows per second.
Hope this helps.
Dan Guzman
SQL Server MVP
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:9F9E926F-74A4-4038-B4F5-CFC55488CD19@.microsoft.com...
>I have been using an OODB as the repository for a stock-quote ticker plant.
> I would love to be able to convert this to SQL Server.
> Quotes come in at a nominal rate of 10K per second with peaks up to 60K.
> The quote is fairly basic data: time, price, volume, ExchangeID - leaving
> out
> the minor variations. I already have this data in a write cache in C#, so
> the data could be cached per stock symbol. While this data is flying in,
> I
> also will be querying a bit heavily also.
> 1) Is this even thinkable with SQL Server 2005 Express, Standard or
> Enterprise?
> 2) I haven't had much luck with good ole Google in finding some direction.
> I'm obviously not a SQLServer expert, but given a pointer towards the
> write
> technology and methods, I might have hope.
> 3) There is a major Stock Trading Technology company that says they use
> SQL
> Server 2005 for this purpose. Of course, they don't describe the methods.
> This is at
> http://members.microsoft.com/Custom...1&LanguageID=1.
> Thanks for any help you might provide

High volume batch insert

Hi,
I need a SQL program to insert a record into a parent table and then up
to 200 child records, using the primary key of the parent record. Whats
the best way to structure this procedure for performance and
reliability ? e.g
INSERT INTO tblExam ( dteExam,intModule,) Values () ...
SET intExamID= @.@.IDENTITY
' Psedo-code
For each Candidate in frmExamRequest
INSERT INTO tblCandidateExam ( intExamID, intCandidateID )
Next
The data is all coming from a form on an ASP page, I could break it
into two forms but for the users a single form with exam date, and list
of candidates they can check/uncheck is much easier.
If I have 2 stored procs to insert a exam instance & candidate
instances, the latter proc will be called 200 times over an ADODB
Connection. Is it possible to have a single stored proc to do the whole
task in a transaction with unknown number of candidates ?
thanks.When the user hits "Enter" you could either collect all the candidate IDs an
d
put them in a comma delimited string and then pass that string to the stored
proc that's doing the insert.
You could perform inserts into tblCandidateExam by looping through the
candidate IDs.
I think that's probably the easy way. Hope that's helpful
Cheers,
mmm
"cc900630@.ntu.ac.uk" wrote:

> Hi,
> I need a SQL program to insert a record into a parent table and then up
> to 200 child records, using the primary key of the parent record. Whats
> the best way to structure this procedure for performance and
> reliability ? e.g
>
> INSERT INTO tblExam ( dteExam,intModule,) Values () ...
> SET intExamID= @.@.IDENTITY
> ' Psedo-code
> For each Candidate in frmExamRequest
> INSERT INTO tblCandidateExam ( intExamID, intCandidateID )
> Next
> The data is all coming from a form on an ASP page, I could break it
> into two forms but for the users a single form with exam date, and list
> of candidates they can check/uncheck is much easier.
> If I have 2 stored procs to insert a exam instance & candidate
> instances, the latter proc will be called 200 times over an ADODB
> Connection. Is it possible to have a single stored proc to do the whole
> task in a transaction with unknown number of candidates ?
> thanks.
>|||See if one of these helps:
http://www.aspfaq.com/show.asp?id=2248 Arrays & Lists
http://www.sommarskog.se/dynamic_sql.html Dynamic SQL
http://www.users.drew.edu/skass/sql...bleProc.sql.txt List to
Table script
Andrew J. Kelly SQL MVP
<cc900630@.ntu.ac.uk> wrote in message
news:1117472922.543985.50420@.g14g2000cwa.googlegroups.com...
> Hi,
> I need a SQL program to insert a record into a parent table and then up
> to 200 child records, using the primary key of the parent record. Whats
> the best way to structure this procedure for performance and
> reliability ? e.g
>
> INSERT INTO tblExam ( dteExam,intModule,) Values () ...
> SET intExamID= @.@.IDENTITY
> ' Psedo-code
> For each Candidate in frmExamRequest
> INSERT INTO tblCandidateExam ( intExamID, intCandidateID )
> Next
> The data is all coming from a form on an ASP page, I could break it
> into two forms but for the users a single form with exam date, and list
> of candidates they can check/uncheck is much easier.
> If I have 2 stored procs to insert a exam instance & candidate
> instances, the latter proc will be called 200 times over an ADODB
> Connection. Is it possible to have a single stored proc to do the whole
> task in a transaction with unknown number of candidates ?
> thanks.
>

Wednesday, March 7, 2012

hierarchical selection within a select statment

CREATE TABLE RS_A(ColA char(1), ColB varchar(10))

INSERT INTO RS_A
VALUES ('S', 'shakespeare')
INSERT INTO RS_A
VALUES ('B', 'shakespeare')
INSERT INTO RS_A
VALUES ('P', 'shakespeare')

INSERT INTO RS_A
VALUES ('S', 'milton')
INSERT INTO RS_A
VALUES ('P', 'milton')
INSERT INTO RS_A
VALUES ('B', 'shelley')

INSERT INTO RS_A
VALUES ('B', 'kafka')
INSERT INTO RS_A
VALUES ('S', 'kafka')

INSERT INTO RS_A
VALUES ('P', 'tennyson')

SELECT * FROM RS_A

Now i need a select which selects based on hierarchy

if ColA = 'S', then select only that row
else if ColA = 'B' then select only that row
else if colA = 'P' then select only that row

So my results should look like
S shakespeare
S milton
B shelley
S kafka
P tennyson

Is there a way to do this within a select statement
I tried using a CASE in WHERE CLAUSE but it put out all rows which
existed/

If any of you can help me with this right away, its is greatly
appreciated
Thanks in advance(rshivaraman@.gmail.com) writes:

Quote:

Originally Posted by

SELECT * FROM RS_A
>
Now i need a select which selects based on hierarchy
>
if ColA = 'S', then select only that row
else if ColA = 'B' then select only that row
else if colA = 'P' then select only that row
>
So my results should look like
S shakespeare
S milton
B shelley
S kafka
P tennyson
>
Is there a way to do this within a select statement
I tried using a CASE in WHERE CLAUSE but it put out all rows which
existed/


First translate the codes to numeric values with CASE, you can take
MIN, and then translate back:

SELECT CASE minval WHEN 1 THEN 'S' WHEN 2 THEN 'B' WHEN 3 THEN 'P' END,
ColB
FROM (SELECT ColB, minval = MIN(CASE ColA
WHEN 'S' THEN 1
WHEN 'B' THEN 2
WHEN 'P' THEN 3
END)
FROM RS_A
GROUP BY ColB) AS x

If there are many possible values for ColA, it would be better to
put the mapping in a table and then join with that table.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Ingenius :
Thank you for the above and the RETURN was what was missing after
RAISEERROR

-RS