All Questions
1,071
questions
0
votes
0
answers
40
views
the DataGridViewComboBox is not filled in
I created a database and wrote functions that should take column names from tables and put them in DataGridViewComboBoxCells. However, after running the program, no errors came out, but all ...
0
votes
0
answers
49
views
Is There a Better Way to Count the Number of Columns in an Access Database Table?
I need to count the number of columns in a Table in an Access Database.
The following code does the job, but I wonder if there is a better way using INFORMATION_SCHEMA.COLUMNS ?
CmdStr = $"...
0
votes
1
answer
116
views
C# date time not match sql date [closed]
I try to develop a windows form program and I need to insert data. I need to insert today's date and time but when I try I get an error. I use access database. Where is my fault?
cmd = new ...
0
votes
1
answer
108
views
how to save the result of moving a row in a datagridview in the database
I have code to move rows in datagridview using mouse drag and drop, but after closing the program or updating the table everything resets. how to make data placement saved in the database?
code that ...
0
votes
1
answer
42
views
Replacing parameters in DataGridView in Winforms
How can I prevent SQL injection in this code using command.CommandText attribute to replace input parameters?
private void button1_Click(object sender, EventArgs e)
{
BindingSource bs =...
-2
votes
1
answer
65
views
Deleting data from the database by selecting the Id column of type int
with the code below, I can delete the data I selected on the grid in string type, but I get an error in the codes when trying to delete a data in int type. how should I edit the relevant code?
private ...
0
votes
1
answer
100
views
Get the number of records of data in the current month
I am trying to find the total number of records of the vehicles that ended in the current month in my database. I do not know what I should write in the InvoiceDate section in this case.
public void ...
-1
votes
1
answer
44
views
i'm experiencing a weird behavior with winform c# timer [closed]
i'm trying to update datagridview from sql server database using a timer. First i got 2 strings
string pervCount = "0";
string newCount = "0";
they are out of my timer, the rest ...
1
vote
0
answers
79
views
Why is my stored procedure not setting the value?
When executing a stored procedure through C#, the value stored in the table does not change.
But when the stored procedure is executed through SQL Server Management Studio, it is executed correctly.
...
0
votes
2
answers
65
views
Datagridview is not refreshing after inserting data
I know this question has been asked more than an acceptable amount of times, but believe me I've tried every solution on each question already show, and it isn't working. After doing the button update ...
0
votes
1
answer
163
views
Winforms project deployment with SQL Server local database
I am currently developing a Winforms application as a college project, and I am currently stuck at deployment/publishing the project. I have tried to publish and run it in a different laptop, but I ...
0
votes
1
answer
99
views
Sql error in C# winform project (error number:102,state:01,class:15)
In my C# winform project I want to make, when the user clicks on the Reg No dropdown list, the
user can see the previously registered registration numbers appearing in the drop
down list. When the ...
0
votes
2
answers
210
views
C# - Windows Form - Delete Button - Won't Properly Execute SQL Command
I am attempting to create a simple Windows Form application that can interact with a database to manage some data. I've run into an issue in my attempts to make a delete button, I've made similar ...
-1
votes
1
answer
41
views
Adjust table adapter on Win Form to allow an expression
I have a form with a Data Grid View for personnel assigned to a project. I currently have a singular drop down that allows you to add people to the project which pulls all names of people based on a ...
-1
votes
1
answer
53
views
Why I can't show datas
When I run the code, the required information does not appear in the gridbox.
{
public partial class fatura : Form
{
SqlConnection baglanti = new SqlConnection("Server=localhost;...