Solved

SQL execution error when trying to open table with many cols

Posted on 2007-11-27
6
368 Views
Last Modified: 2008-02-01
When trying to open a table (that someone else created) with a large number of cols SQLServer 2005 I get the following error:
Error Source: Microsoft.VisualStudio.DataTools
Exception has been thrown by the target of an invocation
I read somewhere the row length is 8060 - I guess this is the cause... Is there a workaround?


0
Comment
Question by:acdagirl
  • 3
  • 3
6 Comments
 
LVL 18

Expert Comment

by:Yveau
ID: 20358480
Try running the code in Code Snippet.
I doubt there is some SQL error here. You might need to look for help in the zones for Visual Studio or the programming language you are using ...

If you can give us the table def, we can calculate the column length (as you can do yourself of course) but when you try to create a table with a record def that is too long, you will get an error and you won't be able to create the table. So I have strong indication that the programming language or tool you are using is having some problems with the number of column. Not SQL Server ...

Hope this helps ...

select  count(*)
from    <Table>
-- should return only the number of records in the table.
 
select  *
from    <Table>
where   1 = 2
-- should return only the column names.
 
select  <column>
from    <Table>
-- select only one single column, not the whole (unknown) number of columns.
 
--

Open in new window

0
 

Author Comment

by:acdagirl
ID: 20358817
i'm opening the table in enterprise manager - there is not other tool here.
0
 
LVL 18

Expert Comment

by:Yveau
ID: 20361755
what about the select statements ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:acdagirl
ID: 20365036
if I do a range it's ok, if I try to select all it fails with the same error.
0
 
LVL 18

Accepted Solution

by:
Yveau earned 500 total points
ID: 20366425
Yep ... the SSMS is also just an application. The datagrid controls which are used for the SSMS also have there boundaries ... just have to live with it. You might want to make a case with MS for this ...
I've noticed these issues as well with several sort of operations on larger tables ...

But in the end ... scripting is always better ... and has never failed me :-)

Hope this helps ...
0
 

Author Comment

by:acdagirl
ID: 20366526
ok thanks
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question