?
Solved

SQL execution error when trying to open table with many cols

Posted on 2007-11-27
6
Medium Priority
?
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

770 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