Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.OleDb
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
Inherits System.Web.Services.WebService
‘<WebMethod()> _
‘Public Function HelloWorld() As String
‘ Return "Hello World"
‘End Function
<WebMethod()> _
Public Function getpassword(ByVal namecode As String, ByRef f001 As Integer, ByRef f002 As Integer, ByVal qpass As String) As Boolean
If qpass <> "123" Then
Exit Function
End If
Dim conn As OleDbConnection = New OleDbConnection("Provider=MSDAORA;Data Source=tsmtsfc;User ID=hftmis;Password=TRACLEMis;")
conn.Open()
Dim dap As New OleDbDataAdapter("select * from sys0003 where f003 like ‘" & namecode & "%‘", conn)
Dim dst As New DataSet
dap.Fill(dst)
Dim rsu As String = ""
‘給回傳值F001,F002賦值------------------------------------
f001 = CInt(dst.Tables(0).Rows(0).Item("f001").ToString())
f002 = CInt(dst.Tables(0).Rows(0).Item("f002").ToString())
‘---------------------------------------------------------
Return True
End Function
<WebMethod()> _
Public Function getxml() As String
Dim conn As OleDbConnection = New OleDbConnection("Provider=MSDAORA;Data Source=cnxinwa;User ID=cnxinwa;Password=qq6872397;")
conn.Open()
Dim dap As New OleDbDataAdapter("select * from cnxinwa0001", conn)
Dim dst As New DataSet
dap.Fill(dst, "sys0001")
Return dst.GetXml
End Function
End Class