Answer the question
In order to leave comments, you need to log in
Why did the error appear and how to fix it?
Hello!
There is this code in C#:
private void button1_Click(object sender, EventArgs e)
{
SqlConnection sQLite = new SqlConnection("Data Source = LAPTOP-KJLU9H2F\\SQLEXPRESS; Integrated Security = True");
sQLite.Open();
string test = $"SELECT * FROM Автомобиль WHERE VIN_номер = '{VIN.Text}' AND Номер_заказа= '{Nomer_zakaza.Text}' AND Номер_филиала = '{Nomer_filiala.Text}'";
SqlDataAdapter dataAdapter = new SqlDataAdapter(test, sQLite);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
dataAdapter.Fill(ds);
"Invalid object name 'Car'."
Answer the question
In order to leave comments, you need to log in
What exactly is the problem with the word Car is not clear to me.Object names must match what is written about them in the documentation. And most likely it does NOT indicate that Cyrillic and other non-A characters are allowed.
You need to put the word Car in quotation marks, just like you did with columns.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question