Sqlite Help
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions 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.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
9 posts
Page 1 of 1
Hi,
i was wondering if someone could tell me how i can really detect if no records exist or just has only value 'True' in it
i use:
Help please
Thanks
i was wondering if someone could tell me how i can really detect if no records exist or just has only value 'True' in it
i use:
Code: Select all
but it always return 0 even if we have no data in the table :( 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
Exit Function
Else
MyFunctions.IsSubmitted = False
Return True
Exit Function
End If
Help please
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
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
Would it not always return 0 if no records exist anyway
If no records then it would return 0
Say if you have 3 records it should return 3...etc
If no records then it would return 0
Say if you have 3 records it should return 3...etc
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Hi,
Yeah , but its not :( it returns 0
and i had a empty db so no records exists
any idea?
Yeah , but its not :( it returns 0
and i had a empty db so no records exists
any idea?
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
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
Okay how many records do you have in that particular database?
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Hi,
The db is empty
so no records exists yet
The db is empty

so no records exists yet
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
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
Dummy1912 wrote:Hi,lol okay. So if no the database has no records the count will return 0 because there are no records ...ie: nothing in the database = 0 records to count
The db is empty
so no records exists yet
Or am I missing something

Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.

is there a extra way so if no records exist we can get an other message?
instead of 0 maybe false?
so we can use that option when we are loading the db and then we can leave that empty instead of submitted ;)
if you can follow

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
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

making me so ....
search on the net for long time
and still nothing about that part we are looking for
just always with 0 even if empty or not.. always that stupid 0
why can't be there a easier solution hahaha
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
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

solved,
i just added a new connection to see if any records exist before we go to the submitted part
and seems that did the trick ;)
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
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
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023