Solved

SQL execution error when trying to open table with many cols

Posted on 2007-11-27
6
358 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now