Click here to Skip to main content
15,881,803 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to restart a Programm in Release-Modus per Code Pin
Bernhard Hiller10-Apr-16 23:04
Bernhard Hiller10-Apr-16 23:04 
AnswerRe: How to restart a Programm in Release-Modus per Code Pin
Member 1191673510-Apr-16 23:51
Member 1191673510-Apr-16 23:51 
GeneralRe: How to restart a Programm in Release-Modus per Code Pin
Eddy Vluggen11-Apr-16 0:33
professionalEddy Vluggen11-Apr-16 0:33 
AnswerRe: How to restart a Programm in Release-Modus per Code Pin
ZurdoDev11-Apr-16 7:47
professionalZurdoDev11-Apr-16 7:47 
GeneralRe: How to restart a Programm in Release-Modus per Code Pin
Member 1191673511-Apr-16 20:38
Member 1191673511-Apr-16 20:38 
GeneralRe: How to restart a Programm in Release-Modus per Code Pin
Pete O'Hanlon11-Apr-16 21:44
mvePete O'Hanlon11-Apr-16 21:44 
AnswerRe: How to restart a Programm in Release-Modus per Code Pin
ZurdoDev12-Apr-16 1:08
professionalZurdoDev12-Apr-16 1:08 
QuestionFiltering - C# winform connected to Access DB Pin
Kipp Doré10-Apr-16 12:51
Kipp Doré10-Apr-16 12:51 
Hello all.
I hoping you could provide some help with a problem I'm having. I have a winform that's developed in Visual Studio 2015 C# that is connected to a Microsoft Access database. This is a fairly small DB. I have no issues with connection or populating my DataGridView with the DB records, but I am having problems with using comboboxes to filter the records based on the users selection. I have 6 comboboxes where the user can select 1 or all 6 comboboxes to filter the table accordingly.
So my problem is that I've tried several things to get this to work but just can't seem to get it working. I think I am not using the correct syntax. Here’s an example of what I’ve tried:

C#
private void cmb_1_SelectedIndexChanged(object sender, EventArgs e)
{
cmd.CommandText = "SELECT * FROM [Document_DB] WHERE [Document Category] '" + cmb_1.Text + "' ";
}


From the code above I’m trying to select all the columns (*) from the database table named Document_DB where I want it to be filtered based on column named Document Category and user selection from cmb_1. Could the space in Document Category be the problem? Should I have name the column heading Document_Category instead? I’d prefer the columns heading not to have underscores in them but if that’s what causing the problem, I’ll just have to do it.
If more info is needed, please let me know. I would greatly appreciate any help you can provide. Thank you!!

modified 10-Apr-16 21:07pm.

AnswerRe: Filtering - C# winform connected to Access DB Pin
Garth J Lancaster10-Apr-16 13:11
professionalGarth J Lancaster10-Apr-16 13:11 
AnswerRe: Filtering - C# winform connected to Access DB Pin
Richard Andrew x6410-Apr-16 14:56
professionalRichard Andrew x6410-Apr-16 14:56 
AnswerRe: Filtering - C# winform connected to Access DB Pin
Richard Deeming11-Apr-16 1:39
mveRichard Deeming11-Apr-16 1:39 
QuestionSelection logic problem Pin
mekubo9-Apr-16 22:31
mekubo9-Apr-16 22:31 
AnswerRe: Selection logic problem Pin
OriginalGriff9-Apr-16 22:34
mveOriginalGriff9-Apr-16 22:34 
QuestionDobble Buffering Pin
FukkPhag19-Apr-16 20:23
FukkPhag19-Apr-16 20:23 
AnswerRe: Dobble Buffering Pin
OriginalGriff9-Apr-16 20:46
mveOriginalGriff9-Apr-16 20:46 
GeneralMessage Closed Pin
10-Apr-16 8:55
FukkPhag110-Apr-16 8:55 
GeneralRe: Dobble Buffering Pin
CHill6010-Apr-16 9:49
mveCHill6010-Apr-16 9:49 
GeneralRe: Dobble Buffering Pin
OriginalGriff10-Apr-16 20:58
mveOriginalGriff10-Apr-16 20:58 
AnswerRe: Dobble Buffering Pin
leon de boer9-Apr-16 22:20
leon de boer9-Apr-16 22:20 
GeneralRe: Dobble Buffering Pin
FukkPhag110-Apr-16 8:48
FukkPhag110-Apr-16 8:48 
AnswerRe: Dobble Buffering Pin
Eddy Vluggen10-Apr-16 10:10
professionalEddy Vluggen10-Apr-16 10:10 
QuestionData Entry application using strongly typed dataset Pin
Rajesh Thampi9-Apr-16 18:09
Rajesh Thampi9-Apr-16 18:09 
AnswerRe: Data Entry application using strongly typed dataset Pin
Eddy Vluggen10-Apr-16 10:17
professionalEddy Vluggen10-Apr-16 10:17 
QuestionCalls a method c# Pin
Bougarra8-Apr-16 1:18
Bougarra8-Apr-16 1:18 
AnswerRe: Calls a method c# Pin
OriginalGriff8-Apr-16 1:30
mveOriginalGriff8-Apr-16 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.