ASP datagrid - parsing returned information from a query

I have a query that returns name, address, city, country, etc, and I want to parse this information to put in a datagrid (vb/asp.net).

I can modify the select statement to combine, but some records don't have countries, or streets, whatever.  I would like to parse this information and I think it would be easiest to make a function in vb and then put it in the datagrid

Does anyoine have any ideas?
bdietzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

babuno5Commented:
here is an example of datagrid with the database


<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="vb" runat="server">
Sub Page_Load(Sender As Object, E as EventArgs)
Dim objConnection As OleDbConnection
Dim objCommand As OleDbDataAdapter
Dim strConnect As String
Dim strCommand As String
Dim DataSet1 As New DataSet
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
strConnect += "Data Source=C:\Rashid.net\asp.net\"    'change this to your database path
strConnect += "\dbSmg.mdb;"
strConnect += "Persist Security Info=False"
strCommand = "SELECT * FROM tbEmployees "           'your select query
objConnection = New OleDbConnection(strConnect)
objCommand = New OleDbDataAdapter(strCommand, objConnection)
objCommand.Fill(DataSet1, "products")
DataGrid1.DataSource=DataSet1.Tables("Products").DefaultView
DataGrid1.DataBind()
End Sub
</script>
<html>
<head>
<title>Data Grid Control example</title>
</head>
<body>
<asp:DataGrid id="DataGrid1" runat="server" />
</body>
</html>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.