Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Monday, March 26, 2012

Migrating a column from ntext to XML

After SQL Server 2005 migration, I'm trying to change my ntext column to XML type.

The "alter table TableName alter column XMLCol xml" command throw this error :

XML parsing: line 1, character 39, unable to switch the encoding

1. Do I have to reformat my nText column before the migration to XML type ?

2. Is there a way to create an XML data type with UFT-8 in SQL Server 2005 ?

Thank you for your help

Thank you for your help

the ntext column must contain well-formed xml to be converted. My guess is the the data in the ntext column looks something like:

<?xml version="1.0" encoding="utf-8"?><root/>

which specifies the wrong encoding for the the xml in an ntext column. If this is the case convert the column to varchar(max) first to fix the encoding, then to xml. For example:

alter table TableName alter column XMLCol varchar(max)
alter table TableName alter column XMLCol xml

If your ntest columns contain a mixture of

<?xml version="1.0" encoding="utf-8"?><root/>

and

<?xml version="1.0" encoding="utf-16"?><root/>

after alter the columns to varchar(max), update them to replace all the "utf-16" with "utf-8" before doing the alter to xml.

Dan AT pluralsight DOT com


|||

hi,

if you would be converting the column from ntext

and you have several hundereds of record in it already

it would be difficult to pinpoint the problem.

here's my suggestion

1. add a new column with XML data type. leave the old ntext column untouched

2. insert into the new column bby batch of 10, 20 or by hundred depending on the size of your table

3. what would be left are problematic not well formed xml

4. deal with the remaining data and insert to the new column

5. when everything is done. drop the old column

6. rename the new XML column with the previous column

regards,

joey

|||

Converting it to varchar(max) is still having the potential to lead to encoding issues or data corruption. Instead the column should be converted to varbinary(max) first and then to XML.

Best regards

Michael

Migrating a column from ntext to XML

After SQL Server 2005 migration, I'm trying to change my ntext column to XML type.

The "alter table TableName alter column XMLCol xml" command throw this error :

XML parsing: line 1, character 39, unable to switch the encoding

1. Do I have to reformat my nText column before the migration to XML type ?

2. Is there a way to create an XML data type with UFT-8 in SQL Server 2005 ?

Thank you for your help

Thank you for your help

the ntext column must contain well-formed xml to be converted. My guess is the the data in the ntext column looks something like:

<?xml version="1.0" encoding="utf-8"?><root/>

which specifies the wrong encoding for the the xml in an ntext column. If this is the case convert the column to varchar(max) first to fix the encoding, then to xml. For example:

alter table TableName alter column XMLCol varchar(max)
alter table TableName alter column XMLCol xml

If your ntest columns contain a mixture of

<?xml version="1.0" encoding="utf-8"?><root/>

and

<?xml version="1.0" encoding="utf-16"?><root/>

after alter the columns to varchar(max), update them to replace all the "utf-16" with "utf-8" before doing the alter to xml.

Dan AT pluralsight DOT com


|||

hi,

if you would be converting the column from ntext

and you have several hundereds of record in it already

it would be difficult to pinpoint the problem.

here's my suggestion

1. add a new column with XML data type. leave the old ntext column untouched

2. insert into the new column bby batch of 10, 20 or by hundred depending on the size of your table

3. what would be left are problematic not well formed xml

4. deal with the remaining data and insert to the new column

5. when everything is done. drop the old column

6. rename the new XML column with the previous column

regards,

joey

|||

Converting it to varchar(max) is still having the potential to lead to encoding issues or data corruption. Instead the column should be converted to varbinary(max) first and then to XML.

Best regards

Michael

Monday, March 12, 2012

migraiton from Analysis Service 2000 to 2005

I get this error during migraiton from Analysis Services 2000 to 2005

Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.Dso.IDbGroup90Ex'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CE55E9E9-9597-4214-B21F-30C7683467B1}' failed due
to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

IMRAN

Recently I successfully migrated OLAP database from 2000 to 2005 didn't see this error even I had to run few times migration wizards. Best guess, may be some thing not installed or configured correctly. However if you give at what step of migration you get this error that will help.

-Ashok

|||Databases:
FoodMart 2000
Data sources:
FoodMart
Dimensions:
Account
Category
Customer Pattern
Customers
Department
Education Level
Employees
Gender
HR^Pay Type
Marital Status
Position
Product
Promotion Media
Promotions
Store
Store Size in SQFT
Store Type
Time
Warehouse
Yearly Income
Years in the Company
Cubes:
Budget
HR
Sales
Trained Cube
Warehouse
Warehouse and Sales
Mining models:
Customer Pattern Discovery
Member Card RDBMS
Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.Dso.IDbGroup90Ex'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CE55E9E9-9597-4214-B21F-30C7683467B1}' failed due
to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).|||

Try upgrading your AS 2005 to SP2.


Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

migraiton from Analysis Service 2000 to 2005

I get this error during migraiton from Analysis Services 2000 to 2005

Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.Dso.IDbGroup90Ex'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CE55E9E9-9597-4214-B21F-30C7683467B1}' failed due
to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

IMRAN

Recently I successfully migrated OLAP database from 2000 to 2005 didn't see this error even I had to run few times migration wizards. Best guess, may be some thing not installed or configured correctly. However if you give at what step of migration you get this error that will help.

-Ashok

|||Databases:
FoodMart 2000
Data sources:
FoodMart
Dimensions:
Account
Category
Customer Pattern
Customers
Department
Education Level
Employees
Gender
HR^Pay Type
Marital Status
Position
Product
Promotion Media
Promotions
Store
Store Size in SQFT
Store Type
Time
Warehouse
Yearly Income
Years in the Company
Cubes:
Budget
HR
Sales
Trained Cube
Warehouse
Warehouse and Sales
Mining models:
Customer Pattern Discovery
Member Card RDBMS
Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.Dso.IDbGroup90Ex'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CE55E9E9-9597-4214-B21F-30C7683467B1}' failed due
to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).|||

Try upgrading your AS 2005 to SP2.


Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, March 9, 2012

Microsoft.ReportDesigner.Drawing.Language

I am getting the a big redX when attempting to open a report in VS.NET 2005, "Deserialization failed: The type initializer for "Microsoft.ReportDesigner.Drawing.Language" threw an exception". Has anyone else get this error? Would you please share your solution to me?

Thanks

I am getting the same error and it's driving me crazy...

Anyone willing to help out?

|||I am getting the same error. If I get a solution, I'll post it here.

Microsoft.ReportDesigner.Drawing.Language

I am getting the a big redX when attempting to open a report in VS.NET 2005, "Deserialization failed: The type initializer for "Microsoft.ReportDesigner.Drawing.Language" threw an exception". Has anyone else get this error? Would you please share your solution to me?

Thanks

I am getting the same error and it's driving me crazy...

Anyone willing to help out?

|||I am getting the same error. If I get a solution, I'll post it here.

Friday, February 24, 2012

Microsoft VBScript runtime error

Hello,

I am currently getting the following error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'QueryString'

/admin/equipment/addequipment.asp, line 128

This is when i try to submit a new database item in Dreamweaver. The DB I am using is SQL Server 2005.

My code is as follows:

Dim equipspec__urlid
equipspec__urlid = "1"
If (QueryString("ID") <> "") Then
equipspec__urlid = QueryString("ID")
End If
%>
<%
Dim equipspec
Dim equipspec_numRows

Set equipspec = Server.CreateObject("ADODB.Recordset")
equipspec.ActiveConnection = MM_intranet_STRING
equipspec.Source = "SELECT * FROM EquipSpec WHERE " + Replace(equipspec__urlid, "'", "''") + " = EquipSpec.ID"
equipspec.CursorType = 0
equipspec.CursorLocation = 2
equipspec.LockType = 1
equipspec.Open()

Would be greatful if anybody could help, let me know if you need more info.

Many thanks.This is not a TSQL issue. You have a type mismatch in your VB code. The error message contains the line in your source code so check that to see the problem.

Microsoft SQLXML Bulkload 4.0 Type Library with SQL Express

Hello,

I'm trying to follow a sample from microsoft for Using SQLXML Bulk Load in the .NET Environment

In the sample c# console app. it says to select add reference then In theCOM tab, selectMicrosoft SQLXML Bulkload 4.0 Type Library (xblkld4.dll) and clickOK.

The problem I have is I cannot find the library or the xblkd4.dll file on my pc.

Does anyone have any suggestions? Any help would be much appreicated.

Thanks

Karl

Hi,

From your description, it seems that you are unable to import the Microsoft SQLXML BulkLoad 4.0 type library, right?

Based on my understanding, XML Bulk Load is a standalone COM object that allows you to load semistructured XML data into Microsoft SQL Server tables. So before you are going to add the library, make sure that you have installed Microsoft SQL Server (i.e Microsoft SQLServer2005) product.

Thanks.

|||

I have the same problem. I have SQL Server 2005 with notification services installed locally and am using v2.0 of the frameworks and Team edition VS.Net 2005 SP1 and am working in C#. I have install SQLXML v4 and have located the dll next to the v3 dll which is listed as a COM object in the reference listing of COMs.

Any help on what steps to take to install so the library shows up in the COM listing would be appreciated.

Edwin

|||

I found a good article on this.

http://64.233.169.104/search?q=cache:jsAQOib9cFoJ:wijix.com/blogs/centricity/archive/2007/04/30/bulk-loading-xml-into-sql-server-2005-using-net.aspx+SQLXMLBulkLoad+Visual+studio+2005+reference&hl=en&ct=clnk&cd=2&gl=us

|||

The link was extremely helpful. Thanks.