[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Dataset not reading table data

Posted on 2016-08-12
12
Medium Priority
?
64 Views
Last Modified: 2016-08-20
Software: Visual Studio & SQl Server 2005.

I have recently ran into a problem where the dataset will not read the table data.
The data is definitely in the table that I need to access.

Thanks for your help!
0
Comment
Question by:dave_sky
[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
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41753985
So many unanswered questions...

1. What does your code look like that attempts to access your data?
2. What does the query or stored procedure look like?
3. Is there an error or exception thrown when trying to access the data?
4. Did this work at one point and suddenly stop working or has it never worked?
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 41753987
What error message do you get?  Please show the code you use as well.
0
 
LVL 66

Assisted Solution

by:Jim Horn
Jim Horn earned 500 total points
ID: 41753997
There are so many ways to take this, but the bottom line here is that experts cannot connect to your data sources and applications look at code, and run queries to test.   All we have to go on is the text, screenshots, and images you post in questions.

So ... please ask your question with enough supporting details for us to answer.
Top 10 Ways to Ask Better Questions, Number Ten.

Thanks in advance.
1
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

Author Comment

by:dave_sky
ID: 41754057
 Me.TblNewPlumbingBid2DetailTableAdapter.Fill(Me.MonarchSQLDataSet.tblNewPlumbingBid2Detail)

Open in new window


1. There is no error message
2. I have been using this same code for several years with no problem
0
 
LVL 20

Accepted Solution

by:
Russ Suter earned 1000 total points
ID: 41754061
There is a command object used by the TableAdapter. That command object will have a CommandText property. That property will reveal the SQL statement used. There may also be Parameters involved. If you run the same SQL statement with the same parameters directly in SSMS what are the results?

We need more information to go on. Providing the query, its parameters, and the query results would be helpful. Of course, redacting sensitive data in the result set would be appropriate. Also, providing the code surrounding the single line you provided above would help. There should be a connection object, a command object, a DataAdapter, and a DataSet or DataTable object involved.
0
 
LVL 45

Assisted Solution

by:AndyAinscow
AndyAinscow earned 500 total points
ID: 41754091
No error message leads one to think it is working correctly.  How do you test there is data in the table.
0
 

Author Comment

by:dave_sky
ID: 41754106
AndyAinscow:

I looked in the table with SSMS and the data is there.
0
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41754117
Just because the data is in the table doesn't necessarily mean that the command object has the proper query and parameters to retrieve the data. If you run the actual query in SSMS does it return rows?
0
 

Author Comment

by:dave_sky
ID: 41754125
This may be getting beyond my capabilities...

If you run the actual query in SSMS does it return rows? (How is this done)?
0
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41754131
I'm assuming you already know how to connect to the database since you can see the tables.

Once connected, click the "New Query" button in the toolbar at the top to open a query window.

Set a breakpoint in your VB application so you can inspect the command object. Use the debugging environment to extract the CommandText property. Copy this and paste it into SSMS.

Click the "Execute" button in the SSMS toolbar and watch for query results.
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 41754186
>>I looked in the table with SSMS and the data is there.

that isn't what I asked.  I asked how do you check the data is in the table you have in your app - not in the database.
0
 

Author Closing Comment

by:dave_sky
ID: 41763910
I found the solution it was a problem with the code in my application.

Thanks for your help!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
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 …

656 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