53 Replies
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
This thing
It should return a number. The number is the amount of actions performed; It should return 1

Does it though?
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
No
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
its return type should be int, not void
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
instead of questioning me, what about you simply hover over it and check it out
Correction:
It's "rows affected"

Also, have you tried first opening the connection and then creating a command? 

Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
The code is literally at the beginning of your program, run it and enlighten us
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
https://github.com/codingdamnitdan/CodingTracker/blob/master/CodingTracker/DatabaseAndTables.cs#L24
Instead of not storing what it returns, save it in a variable, so do
int result = tableCmd.ExecuteNonQuery();
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Use the debugger
But a breakpoint here
https://github.com/codingdamnitdan/CodingTracker/blob/master/CodingTracker/DatabaseAndTables.cs#L25
And start the program in VS
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
in first instance, sus
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
oo, you even have ssms opened
lovely
yes
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
if you take the same command you have there and you simply paste it into ssms; Does it work?
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Youre using sql though, not sqlite?
oh nvm
damn
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Does the sqlite file exist?
From your program
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
the db file that your connection string is pointing at
As far as I understood it, the method is supposed to create it, right?
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
That's what I understand from "CreateDatabase"... that is creates the database
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
There is a method called
SQLiteConnection.CreateFile()
Use it
Actually, that might not be from this nuget
https://stackoverflow.com/a/46084676
Now that is hilarious
https://stackoverflow.com/a/64620743
Hmmm, i seeUnknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
okay, so check what value
connectionString
hasUnknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Fookin xml
all its fault
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Try this

Yeah
Stack Overflow
What is App.config in C#.NET? How to use it?
I have done a project in C#.NET where my database file is an Excel workbook. Since the location of the connection string is hard coded in my coding, there is no problem for installing it in my syst...
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
heh
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
What's the config
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
sigh, I give up
xml should die off already
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
✅ This post has been marked as answered!