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.
3 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

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
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

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

visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

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.
3 posts Page 1 of 1
Return to “Tutorial Requests”