Dim bResult As Boolean = False
Dim objConn As New OleDbConnection(ConfigurationSettings.AppSettings( "conStr"))
Dim strSQL As String
Dim strTestValue As String
Dim objCommand As New OleDbCommand
objCommand.Connection = objConn
strSQL = String.Format("SELECT shopid FROM tblShopInformation WHERE (ShopName='{0}');", ShopName)
objCommand.CommandText = strSQL
objCommand.CommandType = CommandType.Text
objConn.Open()
strTestValue = CType(objCommand.ExecuteScalar, String)
objConn.Close()
If Not strTestValue Is Nothing Then
If strTestValue = ShopName Then
bResult = True
Sorry for the
VB code.