我想从数据库中名为投诉的表中计算名为srno的最大记录数。如何在Web服务中编写它?
我正在使用此代码 '开放
Dim cmd18 As OleDbCommand
Try
'MsgBox("open")
cnn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\CRM.mdb")
cnn.Open()
msg = "select count(srno) from [Complaint] where [status]= '" & Me.RadButton6.Text & "'"
cmd18 = New OleDbCommand(msg, cnn)
str = cmd18.ExecuteScalar()
Catch ex As Exception
' MsgBox("No Records Inserted" + ex.ToString())
Finally
cnn.Close()
End Try
If str Is DBNull.Value Then
Button1.Text = "0"
Else
Button1.Text = Format(CStr(TextBox1.Text)) & Convert.ToInt32(str)
End If
我想要在网络服务..