Click here to Skip to main content
15,888,301 members
Home / Discussions / C#
   

C#

 
GeneralRe: Xbox controller Pin
MarkB7773-Apr-08 19:43
MarkB7773-Apr-08 19:43 
QuestionShould I use Crystal Report in this case? Pin
Faysal3-Apr-08 17:41
Faysal3-Apr-08 17:41 
GeneralRe: Should I use Crystal Report in this case? Pin
carbon_golem4-Apr-08 2:46
carbon_golem4-Apr-08 2:46 
GeneralKey Board hooks Pin
ASysSolvers3-Apr-08 17:23
ASysSolvers3-Apr-08 17:23 
GeneralRe: Key Board hooks Pin
Giorgi Dalakishvili3-Apr-08 22:33
mentorGiorgi Dalakishvili3-Apr-08 22:33 
Questionhow to post an image Pin
netJP12L3-Apr-08 16:27
netJP12L3-Apr-08 16:27 
AnswerRe: how to post an image Pin
Vikram A Punathambekar3-Apr-08 19:24
Vikram A Punathambekar3-Apr-08 19:24 
Generalfinding error Pin
tittly3-Apr-08 16:18
tittly3-Apr-08 16:18 
hi all,

i get error in my application .plz help to recover the error


i add time in the database .before adding in database it
check this time is already exit or not .if exits it don't allow
me to add the same time again

i have two comobox one for hour and second for minute and it contain
int value.i get value from comobox and concatenate both value
and send to database

on running application it give me system error message

private void btnAdd_Click(object sender, System.EventArgs e)
{
//cbxHr.Text hour combo box
//cbxMin.Text min combo box
SaveTiming(cbxHr.Text,cbxMin.Text);
}


private void SaveTiming(string hr, string std_min)
{
bool flag = false;
string connectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Testing;Data Source=(local)";
string test = hr+""+ std_min;

string isExist = "SELECT * FROM timing WHERE s_time=" + test + "";
string sqlInst = "Insert into timing(s_test)Values(" + test + ")";

using (SqlConnection connection = new SqlConnection(connectionString))
{
SqlCommand command = new SqlCommand(isExist, connection);
connection.Open();
SqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
MessageBox.Show("Timing already has been assigned");
flag = true;
}
reader.Close();
if (!flag)
{
SqlCommand cmd = new SqlCommand(sqlInst, connection);
cmd.ExecuteNonQuery();

}
}
}

okey

GeneralRe: finding error Pin
CodingYoshi3-Apr-08 16:29
CodingYoshi3-Apr-08 16:29 
GeneralRe: finding error Pin
gspiteri3-Apr-08 16:37
gspiteri3-Apr-08 16:37 
GeneralRe: finding error Pin
tittly3-Apr-08 16:42
tittly3-Apr-08 16:42 
GeneralRe: finding error [modified] Pin
C#Coudou3-Apr-08 20:08
C#Coudou3-Apr-08 20:08 
QuestionHow to create a keypress event on a form? Pin
Silvyster3-Apr-08 15:40
Silvyster3-Apr-08 15:40 
GeneralRe: How to create a keypress event on a form? Pin
CodingYoshi3-Apr-08 16:17
CodingYoshi3-Apr-08 16:17 
GeneralRe: How to create a keypress event on a form? Pin
Silvyster3-Apr-08 16:39
Silvyster3-Apr-08 16:39 
GeneralRe: How to create a keypress event on a form? Pin
CodingYoshi3-Apr-08 16:50
CodingYoshi3-Apr-08 16:50 
GeneralRe: How to create a keypress event on a form? Pin
Vikram A Punathambekar3-Apr-08 19:29
Vikram A Punathambekar3-Apr-08 19:29 
GeneralXNA Publish [modified] Pin
MasterSharp3-Apr-08 14:48
MasterSharp3-Apr-08 14:48 
General.NET Remoting Pin
CodingYoshi3-Apr-08 13:22
CodingYoshi3-Apr-08 13:22 
QuestionRunning C# application in memory only Pin
Lukas Holota3-Apr-08 10:21
Lukas Holota3-Apr-08 10:21 
GeneralRe: Running C# application in memory only Pin
led mike3-Apr-08 10:25
led mike3-Apr-08 10:25 
GeneralRe: Running C# application in memory only Pin
Giorgi Dalakishvili3-Apr-08 10:26
mentorGiorgi Dalakishvili3-Apr-08 10:26 
GeneralRe: Running C# application in memory only Pin
Skippums3-Apr-08 10:42
Skippums3-Apr-08 10:42 
GeneralRe: Running C# application in memory only Pin
PIEBALDconsult3-Apr-08 11:02
mvePIEBALDconsult3-Apr-08 11:02 
GeneralCan't seem to get an event to be consumed Pin
GuyThiebaut3-Apr-08 10:13
professionalGuyThiebaut3-Apr-08 10:13 

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.