Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 For Xml Raw Issue Please Help Sql Error

Author  Topic 

Mham2k
Starting Member

2 Posts

Posted - 2007-06-01 : 14:58:40
I am trying to write a extremely simple Sql Server 2000 Query through VS 2003 Query. I made a view and now I am trying to use For XML RAW to bring back xml from that view.

If I type this:
SELECT * FROM ViewName
WHERE (EMPLOYEEID = '46109')
It brings back 14 beautiful rows

If I type this
SELECT * FROM ViewName
WHERE (EMPLOYEEID = '46109')
FOR XML RAW
It brings back 2 lines that say <Binary>
When I go directly against my Sql Server those lines turn out to be one full xml line <raw attributes /> and one half line <raw attributes

What am I doing wrong here... I have been at work trying to figure this out for the past 2 days! It seems that Sql Server 2000 doesn't like for XML and views together! It works if I query all 13 tables but that will take entirely to long that is what the view is for.

Just added this: [Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server I just noticed this error was there when I run query analyzer! What does that mean.

Mham2k
Starting Member

2 Posts

Posted - 2007-06-04 : 12:54:29
I solved the error. It was an idiot error all I had to do is make the width of the output maximum and it showed all of them returned. That still does not explain why it only shows two <binary> rows in my .Net query editor and why my program only shows outputs two rows.
Go to Top of Page
   

- Advertisement -