-
quick database question
I'm a beginner at VB.Net and have a question about a problem I've been assigned. It's accessing an Access database which looks like this:
city country pop1995 pop2015
* * * *
* * * *
(etc.)
Question: Write a program that allows the user to specify a city and then displays the percentage of its country's 1995 population that lives in that city.
Here's what I have so far:
Code:
Private Sub Form1_Load(…) Handles MyBase.Load
dim I As Integer
dim connStr As String = Provider=Microsoft.Jet.OLEDB.4.0;” & _
“Data Source = MEGACITIES.MDB”
dim sqlStr As String = “SELECT * FROM Cities”
dim DataAdpater As New OleDb.OleDbDataAdapter(sqlStr, connStr)
Dim dt As New dataTable()
dataAdapter.Fill(dt)
dataAdapter.Dispose()
dim whichCity As String
whichCity = InputBox(“Please enter the city?”, “message”)
What next??