Link to home
Start Free TrialLog in
Avatar of David Svedarsky
David SvedarskyFlag for United States of America

asked on

Dataset not reading table data

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!
Avatar of Russ Suter
Russ Suter

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?
What error message do you get?  Please show the code you use as well.
SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Svedarsky

ASKER

 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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
AndyAinscow:

I looked in the table with SSMS and the data is there.
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?
This may be getting beyond my capabilities...

If you run the actual query in SSMS does it return rows? (How is this done)?
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.
>>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.
I found the solution it was a problem with the code in my application.

Thanks for your help!