'pulls a list of forms for the selected pokemon Dim SqlQry As String = "SELECT [Pokemon_forms].[pokemon_id], [Pokemon].[id], [Pokemon].[identifier], [Pokemon_forms].[form_identifier] " & "FROM [Pokemon], [Pokemon_forms] WHERE (([Pokemon]![id]=[Pokemon_forms]![pokemon_id])) AND [Pokemon]![identifier] = ?;" DbCommand = New OleDbCommand(SqlQry, DbConnection) Dim IdentifierParam As New OleDbParameter("?", OleDbType.VarChar) DbCommand.Parameters.Add(IdentifierParam) IdentifierParam.Value = PokedexList.SelectedItems(0).Text DbConnection.Open() 'error occurs here and states that one or more parameters has no value Dim da As OleDbDataAdapter = New OleDbDataAdapter(SqlQry, DbConnection) Dim ds As DataSet = New DataSet da.Fill(ds, "Pokemon") Dim dt As DataTable = ds.Tables("Pokemon") Dim row As DataRow For Each row In dt.Rows Dim FormIdentifier As String = row("form_identifier") If FormIdentifier = "" Then PkmFormList.Items.Add("Normal") Else FormIdentifier = StrConv(FormIdentifier, vbProperCase) PkmFormList.Items.Add(FormIdentifier) End If Next DbConnection.Close()
!
.
[Pokemon]![id]
[Pokemon].[id]
Dim da As OleDbDataAdapter = New OleDbDataAdapter(SqlQry, DbConnection)
Dim da As OleDbDataAdapter = New OleDbDataAdapter(DbCommand)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)