Quote:
quote:Originally posted by om_prakash
Change the "Textmode" property of password control to password.
Om Prakash
|
Hi Prakash,
I know what u mean. I thought changing the "TextMode " property to "password" is to ".aspx" files. Web services are are ".amsx" files.
I may be wrong.
For example, in Java one can easily use the password mask technoliogy, setEchoChar('*'):
TextField password = new TextField()
password.setEchoChar('*')
I am just wondering if there is this type of technology in
VB.
The code is wriiten below, How can U fix the problem? Please help
<%@ WebService Language="
vb" Class="ISBN" %>
Imports System.Web.Services
Imports System.Data
Imports System.Data.OleDb
Public Class ISBN
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function BookDetail(ByVal strIsbn As String) As String
ByVal strUsername As String, _
ByVal strPassword As String) As String
Dim SecurityDr As OleDbDataReader
Dim SecurityConn As OleDbConnection
Dim SecurityCmd As OleDbCommand
Dim Conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Conn += Server.MapPath("Security.mdb") & ";"
Dim SQL As String = "select Username from Users where username = '"
SQL += strUsername & "' and password = '" & strPassword & "'"
SecurityConn = New OleDbConnection(Conn)
SecurityCmd = New OleDbCommand(SQL, SecurityConn)
SecurityConn.Open()
SecurityDr = _
SecurityCmd.ExecuteReader(CommandBehavior.CloseCon nection)
If SecurityDr.Read() Then
SecurityDr.Close()
Return GetBookDetails(Isbn)
Else
SecurityDr.Close()
Return "Login to library failed."
End If
End Function
Private Function GetBookDetails(ByVal strIsbn As String) As String
Dim objLibraryDR As OleDbDataReader
Dim objLibraryConn As OleDbConnection
Dim objLibraryCmd As OleDbCommand
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Library.mdb") & ";"
Dim strSQL As String = "select Title from Books where ISBN = '" & strIsbn & "'"
Dim strBookTitle As String
objLibraryConn = New OleDbConnection(strConn)
objLibraryCmd = New OleDbCommand(strSQL, objLibraryConn)
objLibraryConn.Open()
objLibraryDR = objLibraryCmd.ExecuteReader(CommandBehavior.CloseC onnection)
If objLibraryDR.Read() Then
strBookTitle = objLibraryDR(0)
Else
strBookTitle = "Book not found in the database"
End If
objLibraryDR.Close()
Return strBookTitle
End Function
End Class