Click here to Skip to main content
15,889,096 members
Home / Discussions / C#
   

C#

 
GeneralRe: beginner question in C# Pin
Ryan Cromwell26-Feb-03 3:11
Ryan Cromwell26-Feb-03 3:11 
GeneralRTF Scrolling Pin
Steven Behnke25-Feb-03 12:29
Steven Behnke25-Feb-03 12:29 
QuestionManaged Directx - partially useless or not? Pin
Filip Strugar25-Feb-03 11:28
Filip Strugar25-Feb-03 11:28 
AnswerRe: Managed Directx - partially useless or not? Pin
Anonymous25-Feb-03 18:20
Anonymous25-Feb-03 18:20 
GeneralOleDbConnection Pin
Jassim Rahma25-Feb-03 9:53
Jassim Rahma25-Feb-03 9:53 
GeneralRe: OleDbConnection Pin
Chris Austin25-Feb-03 13:48
Chris Austin25-Feb-03 13:48 
GeneralRe: OleDbConnection Pin
Jassim Rahma27-Feb-03 7:48
Jassim Rahma27-Feb-03 7:48 
GeneralRe: OleDbConnection Pin
Jassim Rahma27-Feb-03 11:52
Jassim Rahma27-Feb-03 11:52 
I'm using the same code in all my other applications and the strange thing that the same application which is giving an error is working on my laptop with no problems:

strSQL = "SELECT * FROM account WHERE department = 'CRM' AND account_pin = '234567'";

// open database;
strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\temp\\Apps\\CRM Queries\\accounts.mdb;Jet OLEDB:Database Password=mem";

OleDbConnection dbConnection = new OleDbConnection(strConnection);

dbConnection.Open();

OleDbDataReader dbReader;

OleDbCommand dbCommand = new OleDbCommand(strSQL, dbConnection);

dbReader = dbCommand.ExecuteReader();

try
{
update_log("validating department and PIN");

while (dbReader.Read())
{
account_department_name = dbReader["department"].ToString();
account_department_pin = dbReader["account_pin"].ToString();
}

dbReader.Close();

}

catch(Exception exp)
{
MessageBox.Show(exp.Message, "Error");
}

finally
{
dbConnection.Close();
}

Many Thanks,
Jassim Rahma

Jassim Rahma
QuestionDate/Time change on CDO message? Pin
PianoJazz25-Feb-03 8:30
PianoJazz25-Feb-03 8:30 
GeneralA Windows Service question Pin
Radoslav Bielik25-Feb-03 7:55
Radoslav Bielik25-Feb-03 7:55 
Generalmultiple data access component Pin
..Hubert..25-Feb-03 7:51
..Hubert..25-Feb-03 7:51 
GeneralRe: multiple data access component Pin
Chris Austin25-Feb-03 13:50
Chris Austin25-Feb-03 13:50 
GeneralRe: multiple data access component Pin
..Hubert..26-Feb-03 3:35
..Hubert..26-Feb-03 3:35 
GeneralRe: multiple data access component Pin
Chris Austin26-Feb-03 5:20
Chris Austin26-Feb-03 5:20 
GeneralRe: multiple data access component Pin
..Hubert..26-Feb-03 8:46
..Hubert..26-Feb-03 8:46 
GeneralIs Application Active Pin
OBRon25-Feb-03 7:15
OBRon25-Feb-03 7:15 
GeneralRe: Is Application Active Pin
Stephane Rodriguez.25-Feb-03 8:33
Stephane Rodriguez.25-Feb-03 8:33 
GeneralHere's one for ya Pin
Ryan Cromwell25-Feb-03 6:34
Ryan Cromwell25-Feb-03 6:34 
GeneralRe: Here's one for ya Pin
Ryan Cromwell25-Feb-03 6:40
Ryan Cromwell25-Feb-03 6:40 
GeneralException Handling Pin
jtmtv1825-Feb-03 6:23
jtmtv1825-Feb-03 6:23 
GeneralRe: Exception Handling Pin
Anonymous25-Feb-03 18:17
Anonymous25-Feb-03 18:17 
GeneralMIDI and C# Pin
25-Feb-03 5:21
suss25-Feb-03 5:21 
GeneralRe: MIDI and C# Pin
jtmtv1825-Feb-03 6:01
jtmtv1825-Feb-03 6:01 
GeneralRe: MIDI and C# Pin
Richard Deeming26-Feb-03 1:14
mveRichard Deeming26-Feb-03 1:14 
GeneralVerify Userid Pin
cas941225-Feb-03 4:03
cas941225-Feb-03 4:03 

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.