POST-TITLE-HERE

Posted by Author On Month - Day - Year

POST-SUMMARY-HERE

POST-TITLE-HERE

Posted by Author On Month - Day - Year

POST-SUMMARY-HERE

POST-TITLE-HERE

Posted by Author On Month - Day - Year

POST-SUMMARY-HERE

POST-TITLE-HERE

Posted by Author On Month - Day - Year

POST-SUMMARY-HERE

POST-TITLE-HERE

Posted by Author On Month - Day - Year

POST-SUMMARY-HERE

Sample Web Services Source Code

Posted by Sweet Heart On 10:29 AM
Sample Web Services Source Code

Public Function QuoteUnitPrice(ByVal ProductName As String) As Single
Return GetPrice(ProductName)
End Function

Private Function GetPrice(ByVal ProductName As String) As Single
Dim cpqConnection As SqlConnection
Dim cpqCommand As SqlCommand
Dim cpqReader As SqlDataReader
Dim cpqSQL As String
Dim ConnectString As String
Dim cpqResult As Single


cpqResult = -1
ConnectString = "server=localhost;uid=sa;pwd=;database=BogusCompaq"

cpqSQL = "SELECT * FROM cpqProduct WHERE (cpqProductName='" + ProductName + "')"

cpqConnection = New SqlConnection(ConnectString)
cpqConnection.Open()
cpqCommand = New SqlCommand(cpqSQL, cpqConnection)
cpqReader = cpqCommand.ExecuteReader()

While (cpqReader.Read)
cpqResult = cpqReader("cpqUnitPrice")
End While

Return cpqResult
End Function

0 Response to "Sample Web Services Source Code"

Post a Comment

    Featured-video

    Tag-cloud