Can't get dataGrid to show correct information

Posted on 2005-05-01
Last Modified: 2010-04-07
When I upload a file to my server, it writes a record in the FILES table.  Then it goes thru some code and sets the info_id of that record to the the info_id of the last record in the INFO table.
My problem is that after this is done, I want the dataGrid on this page to show only the records in the FILES table that have the same info_id from record in the INFO table that is currently displayed on the page.  
Any ideas?

I can post that section of code if you want.
Question by:jettman26
    1 Comment
    LVL 13

    Accepted Solution

    Dim myCommand as new SqlClient.SqlCommand
    Dim myAdapter as new SqlClient.SqlDataAdapter
    Dim myConnection as new SqlClient.SqlConnection
    Dim myQuery as String

    myConnection.ConnectionString = "Server=SERVER_IP_ADDRESS;initial catalog=DATABASE_NAME;uid=USER_ID;pwd=USER_PASSWORD;"
    myCommand.Connection = myConnection


    myCommand.CommandText = myQuery
    myAdapter.SelectCommand = myCommand
    myAdapter.Fill(Dataset1, "Results")

    DataGrid1.Datasource = Dataset1

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now