Click here to Skip to main content
15,892,161 members
Home / Discussions / C#
   

C#

 
GeneralRe: Application architecture Pin
Christian Graus21-Jul-05 13:45
protectorChristian Graus21-Jul-05 13:45 
GeneralPassword Auth Against local machine user accounts Pin
ezekiel6121-Jul-05 9:27
ezekiel6121-Jul-05 9:27 
GeneralPassword Auth Against local machine user accounts Pin
ezekiel6121-Jul-05 9:26
ezekiel6121-Jul-05 9:26 
GeneralCrystal Reports 9 Pin
Member 177347421-Jul-05 9:15
Member 177347421-Jul-05 9:15 
GeneralRe: Crystal Reports 9 Pin
AmmuRaj21-Jul-05 22:23
AmmuRaj21-Jul-05 22:23 
GeneralRe: Crystal Reports 9 Pin
AmmuRaj24-Jul-05 21:57
AmmuRaj24-Jul-05 21:57 
Generalpanel transparent as splitter moved Pin
Sasuko21-Jul-05 9:05
Sasuko21-Jul-05 9:05 
GeneralOleDbException error Pin
theStorminMormon21-Jul-05 9:02
theStorminMormon21-Jul-05 9:02 
I'm putting together my first C# database application. It compiles fine and seems to be connecting to my database fine, but when I create the command I get the following error:

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll

This is the line VS claims is causing the error:
this.cmdGetNewClients = new System.Data.OleDb.OleDbCommand();

The code around it is:

this.cn.Open();
this.cmdGetNewClients = new System.Data.OleDb.OleDbCommand();
cmdGetNewClients.CommandText = @"SELECT ClientName FROM Clients";
cmdGetNewClients.Connection = this.cn;
OleDbDataReader rdr = cmdGetNewClients.ExecuteReader();
while(rdr.Read())
newClients.Add(rdr["[Client Name]"]);
rdr.Close();
cn.Close();

Can anyone tellme why I'm getting this error and how to fix it?\

Thanks!

The ends can never justify the means. It is the means that determine the ends.
GeneralRe: OleDbException error Pin
squawk21-Jul-05 9:12
squawk21-Jul-05 9:12 
GeneralRe: OleDbException error Pin
theStorminMormon21-Jul-05 9:23
theStorminMormon21-Jul-05 9:23 
GeneralRe: OleDbException error Pin
squawk21-Jul-05 9:31
squawk21-Jul-05 9:31 
GeneralRe: OleDbException error Pin
theStorminMormon21-Jul-05 9:41
theStorminMormon21-Jul-05 9:41 
GeneralRe: OleDbException error Pin
Rob Graham21-Jul-05 9:42
Rob Graham21-Jul-05 9:42 
GeneralRe: OleDbException error Pin
theStorminMormon21-Jul-05 9:46
theStorminMormon21-Jul-05 9:46 
GeneralRe: OleDbException error Pin
squawk21-Jul-05 10:01
squawk21-Jul-05 10:01 
GeneralRe: OleDbException error Pin
Luis Alonso Ramos21-Jul-05 10:40
Luis Alonso Ramos21-Jul-05 10:40 
Generalrefresh form from another form Pin
webhay21-Jul-05 8:35
webhay21-Jul-05 8:35 
GeneralRe: refresh form from another form Pin
Piovra_21-Jul-05 21:32
Piovra_21-Jul-05 21:32 
GeneralDataGrid question Pin
zaboboa21-Jul-05 7:48
zaboboa21-Jul-05 7:48 
GeneralRe: DataGrid question Pin
Alomgir Miah21-Jul-05 8:02
Alomgir Miah21-Jul-05 8:02 
GeneralRe: DataGrid question Pin
squawk21-Jul-05 9:05
squawk21-Jul-05 9:05 
GeneralRe: DataGrid question Pin
Tom Wright21-Jul-05 11:04
Tom Wright21-Jul-05 11:04 
GeneralFinding when items are added or removed in a ListView Pin
Luis Alonso Ramos21-Jul-05 7:28
Luis Alonso Ramos21-Jul-05 7:28 
GeneralDataGridComboBoxColumn does not exit Pin
zaboboa21-Jul-05 6:26
zaboboa21-Jul-05 6:26 
GeneralRe: DataGridComboBoxColumn does not exit Pin
Luis Alonso Ramos21-Jul-05 7:24
Luis Alonso Ramos21-Jul-05 7:24 

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.