の行数を取得したいのですDataSet
が、ここのコードは例外をスローします
Dim con As New SqlConnection("server=localhost;database=MSDSS;Integrated Security=True")
Dim i As Integer
con.Open()
Dim qstr As String = "Select * From SJournal"
Dim sqladp As New SqlDataAdapter(qstr, con)
Dim dt As New DataSet
sqladp.Fill(dt, "SJ")
Dim j As Integer = dt.Tables("SJ").Rows.Count
For i = 0 To j Step 1
Dim rowname As String = dt.Tables("SJ").Rows(i)("JournalName")
Next
文字列の類似度を計算する方法は次のとおりです
Dim Kq As Double = 2
Dim Kr As Double = 1
Dim Ks As Double = 1
Dim ss() As Char = rowname.ToCharArray()
Dim st() As Char = journalname.ToCharArray()
Dim q As Integer = ss.Intersect(st).Count()
Dim s As Integer = ss.Length - q
Dim r As Integer = st.Length - q
Dim total As Double = (Kq * q) / (Kq * q + Kr * r + Ks * s)
解決策を教えてください