on 12-10-2008 6:05 AM
HI everyone, I got a problem. I am on a school project which uses a PDA to connect to the webservice. The PDA will uses the web service to retrieve values from SAP. I tried my webservice for a simple function like Login it is successful. But when i run my PDA emulator on visual studio it is unable to work. I am unable to solve this error, can anyone help me pls. Thank you:)
The following is my webservice coding
<WebMethod(EnableSession:=True, Description:="This method is used to verify and retrieve a user info upon logging in")> _
Public Function Login(ByVal Email As String, _
ByVal Password As String) As String
Dim oCompany As SAPbobsCOM.Company
Dim oRecSet As SAPbobsCOM.Recordset
Dim LoginExist As String
'Dim oDocument As SAPbobsCOM.Documents = Nothing
'oDocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
'oDocument. = SAPbobsCOM.BoDocumentTypes.dDocument_Items
Try
SetConnectionParam("S10036633", "SBODemo_SG", "manager", "manager", "sa", "P@ssw0rd")
If ConnectToDatabase() Then
oCompany = Session("g_CompanyConnection")
oRecSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRecSet.DoQuery("SELECT T0.[firstName] FROM OHEM T0 WHERE T0.[email]='" & Email & "' AND T0.[homeTel]='" & Password & "' AND T0.[position] IN (3,5)")
If Not oRecSet.EoF Then
LoginExist = "True"
Else
LoginExist = "False"
End If
End If
Catch ex As Exception
Session("g_LastErrorMsg") = ex.Message
End Try
Return LoginExist
End Function
This is my code in visual studio 2005
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Dim localhost As New localhost.Service
Dim dtLogin As String = ""
Dim Username As String = ""
Dim Password As String = ""
Username = CType(txtUsername.Text, String)
Password = CType(txtPassword.Text, String)
dtLogin = localhost.Login(Username, Password)
If dtLogin = "True" Then
Dim form As New frmHome
form.Show()
Else
MessageBox.Show("Invalid Username / Password")
End If
End Sub
This is an image for my PDA .
http://img389.imageshack.us/my.php?image=screenshot2887tb0.jpg
Im using window mobile 5 Pocket PC emulator
Please help me. Really in need of help. Thank you very much
Judy, please note:
This forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.
Your query does not appear to be related to the above and if I am correct, you will have to post to an SAP(?) forum.
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.