나는 다음과 같은 필드 SQLite는 테이블이 있습니다vb.net의 SQLite는 방법을 선택한 레코드를 통해 루프와 다른 함수에 매개 변수로 각 레코드를 통과 할
Langauge level hours
German 2 50
French 3 40
English 1 60
German 1 10
English 2 50
English 3 60
German 1 20
French 2 40
내가 언어를 기반으로 기록을 반복하고 싶지 및 다른 조건을 적용한 다음 현재 선택된 레코드를 다른 기능으로 전달합니다. 그래서 실제 코드와 psudo 코드가 다음과 같이 혼합되어 있습니다. psudo 코드를 실제 코드로 변환하는 데 도움이 필요합니다. 나는 그렇게하기가 어렵다. 당신의 도움에 대한
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
Do While i <= langs.count
If langs(i) = "German" Then
oslcCommand.CommandText = "SELECT * FROM table WHERE language = '" & langs(i) & "';"
For each record selected 'psudo code
If level = 1 Then 'psudo code
update level to 2 'psudo code
minorp(currentRecord) 'psudo code: calling minorp function and passing the whole record as a parameter
End If 'psudo code
If level = 2 Then 'psudo code
update level to 3 'psudo code
minorp(currentRecord) 'psudo code: calling minorp function and passing the whole record as a parameter
End If 'psudo code
Next 'psudo code
End If
If langs(i) = "French" Then
oslcCommand.CommandText = "SELECT * FROM table WHERE language = '" & langs(i) & "';"
For each record selected 'psudo code
If level = 1 Then 'psudo code
update level to 2 'psudo code
minorp(currentRecord) 'psudo code: calling minorp function and passing the whole record as a parameter
End If 'psudo code
If level = 2 Then 'psudo code
update level to 3 'psudo code
minorp(currentRecord) 'psudo code: calling minorp function and passing the whole record as a parameter
End If 'psudo code
Next 'psudo code
End If
Loop
End Sub
많은 감사를 : 여기에
내가 가진 것입니다.
제발 보여줄 수있는 방법 sqlite 함께 할. vb.net 및 sqlite를 사용하여 예제를 찾는 데 어려움을 겪고 있습니다. 감사합니다 – mazrabul
글쎄, 의사 코드를 표시하고 있기 때문에 당신이 쿼리에서 DataSet 또는 DataReader를 얻고 있다고 가정하고 있습니다. DataTable 및 DataReader 클래스를 확인하십시오. 둘 다 DataRows 컬렉션 (DataReader의 행?)을 가지고 있습니다. – Raj
예, 데이터 집합을 사용하고 있습니다. 수업을 확인하고 내가 뭘 찾았는지 알았어. 감사 – mazrabul