Can't get dataGrid to show correct information

Posted on 2005-05-01
Medium Priority
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

Torrwin earned 2000 total points
ID: 13908788
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

840 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