?
Solved

Why won't this return data to my DataGrid?

Posted on 2008-02-05
2
Medium Priority
?
236 Views
Last Modified: 2013-11-26
I use the following code to query an SQL table for some values. When I try the query in the "Preview Data" window I get the data I need. However, when I run it in the IDE I get nothing to my data grid. The DataSet (DS1) displays a bunch of question marks and I have never experienced this before with a simple query. Any ideas?

Thanks,

Brad
Dim d1 As String ' holds date1
        Dim d2 As String ' holds date1
        Dim d As Date ' used to covert to date value
        Dim dd As Date ' used to covert to date value
        d1 = txtMonth1.Text + "/" + txtDay1.Text + "/" + txtYear1.Text + " 00:00:01"
        d2 = txtMonth2.Text + "/" + txtDay2.Text + "/" + txtYear2.Text + " 00:00:01"
        d = Convert.ToDateTime(d1)
        dd = Convert.ToDateTime(d2)
        LATA.FillByDate(DS1.ladetail, d1, d2)
        DataGridView1.DataSource = DS1.Tables("ladetail")
        DataGridView1.Refresh()

Open in new window

0
Comment
Question by:bradbritton
2 Comments
 
LVL 6

Accepted Solution

by:
pollock_d earned 1500 total points
ID: 20827661
should you be using d and dd in your FillByDate ?

LATA.FillByDate(DS1.ladetail, d, dd)
0
 

Author Comment

by:bradbritton
ID: 20833358
tried that still no data. Please see attached file.
screen-shot.JPG
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

601 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