Copyright Codenstuff.com 2017
YOU NEED TO BE LOGGED IN TO USE THIS FEATURE


Register
Credits
0
Reputation
0
Looking if DB Records Don't contains any?
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.


Hello,

Can someone give me an example for
when looking from a DB Table Ledger
and see if no records from Ledger contains a value 'False'
i just need to check from Ledger table 1 value only not the other values that contains 'True or False'

i use Sqlite ;)

Thanks
Jikes that was a good thinking lol

i did this and works :nersmile

what coffee do sometimes

Code: Select all
                        If SearchSubmitted("False", .mMonthID, .mYearID) Then
                            .Notes = ""
                        Else
                            .Notes = "Submitted"
                        End If


    Public Function SearchSubmitted(ByVal Value As String, ByVal monthid As Integer, ByVal yearid As Integer) As Boolean
        'WHERE SALARY LIKE '200%'
        Try
            Dim whereClause As String = "monthid ='" & monthid & "' AND yearid ='" & yearid & "' AND status LIKE '" & Value & "%'"
            Dim count As Integer = Convert.ToInt32(DataBase.ExecuteScalar("SELECT count(*) FROM transactions WHERE " & whereClause & " ;"))

            If count = 0 Then
                MyFunctions.IsSubmitted = True
                Return False
            Else
                MyFunctions.IsSubmitted = False
                Return True
                Exit Function
            End If
            Return True
        Catch ex As Exception
            MyFunctions.IsSubmitted = False
            Return False
            Exit Function
        End Try
    End Function

Sorry I wasn't around to help answer your question.

However, I do like it when you find the solution yourself. It shows that you're learning new things on your own and your knowledge of coding is getting better and better. Well done.

The code-force is with you :)
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.



Online now

Users viewing this forum: No registered users and 1 browsing

cron