<AjaxPro.AjaxMethod()> Public Function GetStateName(ByVal stateInitial
As String) As String
Try
sCon1.Open()
Dim strSQL As String = "Select count(*) from WBS_Table
where [WBS Number] = '" & stateInitial & "'"
Dim cmd As New SqlCommand(strSQL, sCon1)
Dim intCnt As Integer = cmd.ExecuteScalar()
sCon1.Close()
If intCnt = 0 Then
Return "This WBS is unique"
Else
Return "Please select another Number!"
End If
Catch ex As Exception
Return ex.ToString()
Finally
sCon1.Close()
End Try
'Select Case stateInitial.ToUpper()
' Case "CA"
' Return "California"
' Case "NY"
' Return "New York"
' Case "IL"
' Return "Illinois"
' Case Else
' Return "What tha'!"
'End Select
End Function
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---