Click here to Skip to main content
15,916,693 members
Home / Discussions / C#
   

C#

 
Questioncrystall report viewer [modified] Pin
iman_kh18-Apr-06 21:27
iman_kh18-Apr-06 21:27 
AnswerRe: crystall report viewer Pin
crazymubashir19-Apr-06 20:13
crazymubashir19-Apr-06 20:13 
QuestionPlug-in based development… Pin
anderslundsgard18-Apr-06 21:16
anderslundsgard18-Apr-06 21:16 
AnswerRe: Plug-in based development… Pin
Jon Hulatt19-Apr-06 0:39
Jon Hulatt19-Apr-06 0:39 
GeneralRe: Plug-in based development… Pin
anderslundsgard19-Apr-06 3:21
anderslundsgard19-Apr-06 3:21 
QuestionUse dll file written by C++ MFC in C# Pin
cuongcntt200218-Apr-06 21:08
cuongcntt200218-Apr-06 21:08 
AnswerRe: Use dll file written by C++ MFC in C# Pin
Aaron Dilliard19-Apr-06 4:01
Aaron Dilliard19-Apr-06 4:01 
QuestionException: Array index out of bounds Pin
Kranti125198418-Apr-06 21:03
Kranti125198418-Apr-06 21:03 
Hi,

I'm writing an application in c#.net and i'm completely new to it.
Please refer to the following code in which i'm getting an exception...


//.....................................................................

String classStartTime;

conn.Open();

String myQuery = "Select starttime from tblecture";

OdbcCommand myCommand = new System.Data.Odbc.OdbcCommand(myQuery, conn);

OdbcDataReader dataReader = myCommand.ExecuteReader();

try
{
while (dataReader.Read()) //exception
classStartTime = dataReader.GetTime(0).ToString();
}

finally
{
dataReader.Close();
conn.Close();
}

//.....................................................................


I'm getting this exception for only column named "starttime"; for other fields this code works fine.
Is there any other way to read a field of type time from database?

Thanks,
Kranti

-- modified at 4:13 Wednesday 19th April, 2006
AnswerRe: Exception: Array index out of bounds Pin
Tehnoon18-Apr-06 22:09
Tehnoon18-Apr-06 22:09 
GeneralRe: Exception: Array index out of bounds Pin
J4amieC18-Apr-06 22:11
J4amieC18-Apr-06 22:11 
AnswerRe: Exception: Array index out of bounds Pin
Guffa18-Apr-06 22:09
Guffa18-Apr-06 22:09 
GeneralRe: Exception: Array index out of bounds Pin
Kranti125198418-Apr-06 22:18
Kranti125198418-Apr-06 22:18 
GeneralRe: Exception: Array index out of bounds Pin
J4amieC18-Apr-06 23:06
J4amieC18-Apr-06 23:06 
GeneralRe: Exception: Array index out of bounds Pin
Kranti125198418-Apr-06 23:09
Kranti125198418-Apr-06 23:09 
GeneralRe: Exception: Array index out of bounds Pin
J4amieC18-Apr-06 23:48
J4amieC18-Apr-06 23:48 
GeneralRe: Exception: Array index out of bounds Pin
Kranti125198419-Apr-06 0:24
Kranti125198419-Apr-06 0:24 
GeneralRe: Exception: Array index out of bounds Pin
J4amieC19-Apr-06 0:40
J4amieC19-Apr-06 0:40 
Questioncombo boxes and picture uploading in c# Pin
nomsnoms18-Apr-06 21:02
nomsnoms18-Apr-06 21:02 
GeneralRe: combo boxes and picture uploading in c# Pin
Yuvi Panda19-Apr-06 2:46
Yuvi Panda19-Apr-06 2:46 
Questionusage of GE API Pin
naveedqau18-Apr-06 20:18
naveedqau18-Apr-06 20:18 
QuestionHow we transfer a table from dbf to sql server 2000 through programming in c# with table schema Pin
Vinod Soni18-Apr-06 20:17
Vinod Soni18-Apr-06 20:17 
Questionexport the contents of a datagrid to a SQL 2000 Pin
Gavish George18-Apr-06 20:03
Gavish George18-Apr-06 20:03 
QuestionRegex.Split() produces extra null strings Pin
Vikram A Punathambekar18-Apr-06 19:58
Vikram A Punathambekar18-Apr-06 19:58 
AnswerRe: Regex.Split() produces extra null strings Pin
Guffa18-Apr-06 20:48
Guffa18-Apr-06 20:48 
GeneralRe: Regex.Split() produces extra null strings Pin
Vikram A Punathambekar18-Apr-06 21:19
Vikram A Punathambekar18-Apr-06 21:19 

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.