i have a program to read data from sql server using vb .net web service but i have an error when i run my code like this
my code
<WebMethod()> _
Public Function TopKill() As Integer
Dim con As New SqlConnection
con.ConnectionString = "Data Source=127.0.0.1;Initial Catalog=RF_User;Integrated Security=True"
Dim killing As Integer
con.Open()
Dim cmd As New SqlCommand(("SELECT TOP 20 Name, [Kill], Death FROM tbl_pvporderview Join(tbl_base) ON tbl_pvporderview.serial = tbl_base.Serial ORDER BY [Kill] DESC"), con)
Dim killreader As SqlDataReader
killreader = cmd.ExecuteReader()
killreader.Read()
If killreader.HasRows Then
killing = killreader.Item("Name").ToString
killing = killreader.Item("Kill").ToString
killing = killreader.Item("Death").ToString
End If
con.Close()
Return killing
End Function ' TOP 20 Killer
i don't know how to fix it. any one can help me to fix my code
thanks before
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.