✅ Help with SQLite INSERT INTO C#
Hey all, I'm running this code and I don't understand why there is no data being stored in my created table.
20 Replies
Any exceptions?
My usual suspect is that the project being kept in OneDrive/Dropbox/Mega folder can screw things up sometimes
Another sus thing is that you're creating multiple tables with dynamic names for some reason
Oh yea, I was just trying some things out, I want the table to be just "Viewers"
I changed it back now, but no there are no exceptions
the log tells me it run the action just fine but there is no data in my db
Maybe the fact you have
@"userId"
instead of "@userId"
for parameters?Another guess would be OneDrive screwing things up
Okay, let me see if thats the issue
And another would be that you're checking a different database than the one that gets created... somehow
It'd be best to just not rely on absolute paths, so you always know where the database file is in relation to the exe
Okay I will change that too, thank you.
If you want to have a backup of your code, rely on Git and Github, not on OneDrive
It's because I usually do not stream alone, and therefor have to sync the file to my buddy
Well he can always
git pull
the changes
Or are you doing some demented OneDrive-based version of pair programming where the files get updated live as each of you edits them?I see okay
Think so
Imma just try to move it to desktop rq and see if something changes
Most IDEs nowadays have tools for pair programming built-in so you don't need to rely on scuffed solutions like that, just FYI
Okay, thank you
I moved it to a different drive, also changed it to the relative path and yet while it does create the table it does not store data in it
Ah, wait, you never execute the
sqlInsert
command!
It's always the simple things lmao
Oh my god, thanks a lot. I've been struggling for hours now. Appreciate it!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.