Showing posts with label mixed. Show all posts
Showing posts with label mixed. Show all posts

Thursday, March 8, 2012

data mixed up after update

Hi!

I have quite strange problem, that I haven't seen before.

When I use update command:

UPDATE categorys SET banner_valid= '0', section_id= '1', main_cat_default= '0', banner= '', b_link= '', external_text= 'Nākotnes parks ', in_frontpage= '1', name = '100. pants' WHERE (id = 130)

Then the field EXTERNAL_TEXT should have value Nākotnes parks but instead of this it makes it Nakotnes parks.

I changed collation to Latvian and this did not work.

But!!! When I open Enterprise manager and just type in Nākotnes parks and save it then it is ok, but it does not work with Update/add script

Any help or ideas?

I would try changing Asp.net to UTF16, maybe Latvian is only UTF 16. That maybe the reason it works in Enterprise manager and not in your application. SQL Server Unicode is multibyte UTF16 while .NET you have the option of using singlebyte UTF8. Hope this helps.

Kind regards,

Gift Peddie

|||You need to tell SQL Server that you're submitting Unicode text by giving your string the N prefix:
UPDATE categorys
SET banner_valid= '0',section_id= '1', main_cat_default= '0', banner= '', b_link= '',external_text= N'Nākotnes parks ', in_frontpage= '1', name = '100.pants'
WHERE id = 130
|||

SQL Server Unicode is multibyte UTF16


Actually it's not. It's UCS2, which is a fixed-length encoding.

you have the option of using singlebyte UTF8


UTF-8 is a variable-length encoding, so a given character encoded with UTF-8 *may* only require a single byte, or it may require two bytes, or four. It can represent anything that you can store in UCS2 just fine.

Friday, February 24, 2012

data loss

Hi,

I have a big problem with a database in MS SQL SERVER 2000.

the rows into the some tables, for the second time, have been mixed between
they without appearing reason.

the application that uses the db is totally TRANSACTIONAL and they do not
exist query that they do not have clause WHERE.

The database is on a computer with NAS architecture.

I have this problem for the first time in 5 years of use of MS SQL SERVER

Can someone help me?

TIA"Stefano Ferrante" <s.ferrante@.staffmedia.it> wrote in message
news:c2flov$sqc$1@.lacerta.tiscalinet.it...
> Hi,
> I have a big problem with a database in MS SQL SERVER 2000.
> the rows into the some tables, for the second time, have been mixed
between
> they without appearing reason.

I have no idea what you mean above. Inserted rows are disappearing?

Or rows appear to be in a different order when you do a select?

Remember, a table is a collection of rows. There is NO order unless you use
an ORDER BY clause. It doesn't matter what order they are inserted in.

> the application that uses the db is totally TRANSACTIONAL and they do not
> exist query that they do not have clause WHERE.
> The database is on a computer with NAS architecture.

SQL Server does NOT normally support a NAS architecture. Are you sure
you don't mean SAN? That's more common.

> I have this problem for the first time in 5 years of use of MS SQL SERVER
> Can someone help me?

> TIA|||Stefano,
SQL Server is behaving normally if it is randomly sorting data. Data is not
supposed to be sorted any particular way and you are not supposed to write
code that relies on a particular sort. If you did write code that depends
on a particular sort, shame on you--but a view with an ORDER BY clause may
get you the sort you need. However--most of the time ORDER BY also means
the data isn't updateable so if the reason for the sort is to update things
you may be SOL.

"Stefano Ferrante" <s.ferrante@.staffmedia.it> wrote in message
news:c2flov$sqc$1@.lacerta.tiscalinet.it...
> Hi,
> I have a big problem with a database in MS SQL SERVER 2000.
> the rows into the some tables, for the second time, have been mixed
between
> they without appearing reason.
> the application that uses the db is totally TRANSACTIONAL and they do not
> exist query that they do not have clause WHERE.
> The database is on a computer with NAS architecture.
> I have this problem for the first time in 5 years of use of MS SQL SERVER
> Can someone help me?
> TIA