All Questions
351
questions
0
votes
0
answers
69
views
C# Sqlite and dataGridView Database
There is a datagridview table in the project into which data from the sqlite database is filled. The data is entered into the database manually using the cell value changed event (like in excel). The ...
1
vote
1
answer
88
views
How do i reference objects directly in the classes using ORMlite?
I am trying to map the attributes of a class directly to the corresponding object but I don't know how.
This is the database definition:
CREATE TABLE "Projects" (
"project_id" ...
0
votes
2
answers
27
views
Inserting a single row at the very first start-up in Entity Framework
I have a sqlite database with a table defined in my DataContext class:
public DbSet<SystemInfo> SystemInformation { get; set; }
This table always contains just a single row with the system ...
0
votes
2
answers
184
views
Problem with primary key adding a record to a SQLite table
I'm using
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.8" />
I create a table in sqlitestudio:
CREATE TABLE Product
(
name TEXT,
...
0
votes
0
answers
139
views
How can I fix SQLite error code 17 when running SELECT statement on empty table in C#?
The following error is appearing in my debug log:
SQLite error (17): statement aborts at 11: [SELECT car_id, car_name FROM car_info] Database schema has changed.
I am running the above SELECT ...
0
votes
1
answer
489
views
Pass parameters to sqlite query in safer manner
Here is my method to fetch data older than n number of days/months from sqlite database. Below method will be called with 2 params.
Example,
Fetch data older than 10 days -> GetOldData(10, "...
0
votes
1
answer
52
views
How does List work in EntityFramework Entity?
I have 2 data models:
public class Role
{
int Id;
string Name;
}
and
public class User
{
int Id;
string Name;
List<Role> Roles;
}
there is my DbContext:
public class ...
-1
votes
1
answer
120
views
C# Incrementing a table value directly in the update query, using parameters
I know that you can increment a value in SQL by doing the following:
"UPDATE Table SET value=value+1 where Id=@Id"
Now, I'm wondering if it's possible to do the equivalent with parameters?
...
-1
votes
1
answer
448
views
c# System.Data.SQLite.SQLiteException: "SQL logic error unrecognized token: '#' "
I want to Capture network traffic and save the ASCII code in my database and I still got this(is it unsupported character in database?):
Unhandled exception. code = Error (1), message = System.Data....
-2
votes
1
answer
183
views
C# Store an object that has a dictionary as a field in SQL Database
I have a long list of crafted items with a reagents dictionary consisting of an int that is the id of a reagent and an int that is the quantity to use.
I have no idea how to store this list in tables.
...
-5
votes
2
answers
225
views
C# SQLite getting an SQL logic error when trying to SELECT * FROM [duplicate]
I am trying to select data from a SQLite database using a variable from a textbox to display it in a dataGridView.
This is the line:
SQLiteCommand sql = new SQLiteCommand("SELECT * FROM Customers ...
0
votes
2
answers
202
views
How to Get Last Record Using LINQ - Entity Framework in SQLite
I need to translate the following SQLite query to LINQ in C#
SELECT sup.SupplierName, sup.SupplierID, pr.Price, max(pr.AddedDate)
FROM Suppliers sup
LEFT JOIN ItemsPrices pr
USING(SupplierID)
WHERE pr....
0
votes
1
answer
376
views
C# Reading SQLite table concurrently
The goal here is to use SQL to read a SQLite database, uncompress a BLOB field, and parse the data. The parsed data is written to a different SQLite DB using EF6. Because the size of the incoming ...
0
votes
0
answers
113
views
Run SQL Command in Asp Net
I want to write a value to a SQLite Database when I click on a button. How can I archive that? I found out how I can read data from a database using models, but not how to write data.
@model ...
0
votes
1
answer
265
views
Blazor Server App - Use SQLite values on my Index
I have calculator and use inputs and system values to get results,
The app:
Example:
Inputs:
<div class="col-sm-6">
<label>Gross Tonnage</label>
&...