Я бы предложил вам создать класс, например
public class LanguageCourse
'Prob better to make these properties
public Language as string
public Level as integer
public Hours as integer
public sub new(language as string, level as integer, hours as integer)
Language = language
Level = level
Hours = hours
end sub
end class
Ваш код выше может стать следующим:
Private sub mainp()
Dim oslcConnection As New SQLite.SQLiteConnection
Dim oslcCommand As SQLite.SQLiteCommand
Dim langs() As String = {"German", "French", "English"}
Dim i as Integer = 0
oslcConnection.ConnectionString = "Data Source=" & My.Settings.dbFullPath & ";"
oslcConnection.Open()
oslcCommand = oslcConnection.CreateCommand
'Not sure why you were looping round these like this. It's also not a great idea to
'build up your sql queries by concactenating strings, better to parameteris them, but
'seeing as how this seems to be hard coded anyway, better even like this:
dim course as LanguageCourse
oslcCommand.CommandText = "SELECT * FROM table WHERE language IN ("German", "French", "English");"
For each record selected 'psudo code
course = new LanguageCourse(record.language, record.level, record.hours)
'This function should handle your update as you just seem to be adding one to
'something, for certain criteria.
minorp(course)
Next 'psudo code
End Sub
Обратите внимание, что это все еще псевдокод, поскольку он не будет компилироваться :)