Posts by tutiBits • 7 points
5 posts
-
0
votes1
answer1049
viewsQ: Datadirectory C#
I need a flexible connection string so that it automatically searches the program folder for file . mdf. My following code is like this: public Form1() { string relative = @"..\..\Database1.mdf";…
-
0
votes1
answer34
viewsA: Combobox and Sqlreader
The verification with the if era unnecessary, once I use the clause WHERE in the cmd. I just edited: SqlDataReader DR; DR = cmd.ExecuteReader(); if (DR.Read()) { Messagebox.Show =…
-
0
votes1
answer34
viewsQ: Combobox and Sqlreader
I have a ComboBox with a list of items containing names that are generated from my database (I pull up the name of coluna beer that are allocated in the table): private void Form1_Load(object…
-
0
votes1
answer150
viewsQ: C# Combobox and SQL
I would like to know how to load values in a combobox, listing an entire column of the database, for example, I have a column called "Beer" and it has several names, I would like to list this column…
-
0
votes1
answer73
viewsQ: Connection error while performing query
I’m a beginner in programming and I’m trying to connect to a database. But by clicking the "Search" button to browse the database and exbir values on my screen, the following error is generated…