Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
Function validatepartNo(strpartnumber As String) As Boolean Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim strSQL As String cnn = SQLDB_CONN_STRING cnn.CommandTimeout = 300 ' added cnn.Open ' MsgBox strpartnumber strSQL = "Select count(*) from tblParts Where UPN = '" & Trim(strpartnumber) & "'" rst.Open strSQL, cnn If Trim(rst(0).Value = 0) Then validatepartNo = False MsgBox "Partno not existing in tblParts table", vbOKOnly, " Invalid Partno" Else validatepartNo = True End If rst.Close cnn.Close End Function
|Best book to learn C++||3||29|
|Steps for fail over log shipping database from primary to secondary during DR drill and switch back||2||33|
|SQL Round a percentage||2||13|
|SQL syntax, SEL FROM sys.messages WHERE sys.messages.text LIKE ' %NULL%'||4||0|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!