Click here to Skip to main content
15,925,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: Console App Pin
Colin Angus Mackay10-Aug-06 22:55
Colin Angus Mackay10-Aug-06 22:55 
GeneralRe: Console App Pin
JacquesDP10-Aug-06 23:02
JacquesDP10-Aug-06 23:02 
AnswerRe: Console App Pin
Colin Angus Mackay10-Aug-06 20:08
Colin Angus Mackay10-Aug-06 20:08 
QuestionPass the value from one page to another page..... Pin
Prabs frm PGP10-Aug-06 18:43
Prabs frm PGP10-Aug-06 18:43 
AnswerRe: Pass the value from one page to another page..... Pin
_AK_10-Aug-06 19:40
_AK_10-Aug-06 19:40 
GeneralRe: Pass the value from one page to another page..... Pin
Prabs frm PGP10-Aug-06 20:21
Prabs frm PGP10-Aug-06 20:21 
Questiondisplay textfile contents on a bound form Pin
Glen Harvy10-Aug-06 17:37
Glen Harvy10-Aug-06 17:37 
QuestionHelp find whats wrong with my insert procedure Pin
arn_nold10-Aug-06 16:31
arn_nold10-Aug-06 16:31 
private void btnADD_Click(object sender, EventArgs e)
{
DataRow newRow = dataTable.NewRow();
DateTime login = this.timePicLogin.Value;
DateTime logout = this.timePicLogOut.Value;
TimeSpan ts = logout - login;
this.tbTotalLog.Text = ts.ToString();


newRow["LogIn"] = timePicLogin.Text;
newRow["LogOut"] = timePicLogOut.Text;
newRow["TotalLog"] = tbTotalLog.Text;
newRow["Activity"] = rtActivities.Text;
newRow["Date"] = DateTime.Today.ToShortDateString();

dataTable.Rows.Add(newRow);

ShowLB();


try
{
dataAdapter.Update(dataSet, "ActivityReport");
dataSet.AcceptChanges();
Application.DoEvents();
}
catch (OleDbException ex)
{
MessageBox.Show(ex.Message);
dataSet.RejectChanges();
}

FillLB();
}





private void FillLB()
{

string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; User Id=; Password=; Data Source=C:\\Documents and Settings\\arnold\\My Documents\\db1.mdb";

string strCommand = "Select * from ActivityReport";

dataAdapter = new OleDbDataAdapter(strCommand, strConnection);

dataSet = new DataSet();
dataAdapter.Fill(dataSet, "ActivityReport");

OleDbCommandBuilder bldr = new OleDbCommandBuilder(dataAdapter);
dataAdapter.UpdateCommand = bldr.GetUpdateCommand();
dataAdapter.DeleteCommand = bldr.GetDeleteCommand();
dataAdapter.InsertCommand = bldr.GetInsertCommand();



dataTable = dataSet.Tables[0];

ShowLB();
}




private void ShowLB()
{
lbDate.Items.Clear();

foreach (DataRow dataRow in dataTable.Rows)
{
lbDate.Items.Add(dataRow["Date"]);
}
}



im catching an error: "syntax error INSERT INTO statement"
tnx.

AnswerRe: Help find whats wrong with my insert procedure Pin
Dave Kreskowiak10-Aug-06 16:40
mveDave Kreskowiak10-Aug-06 16:40 
QuestionHTML formatted label in winforms? [modified] Pin
TheCardinal10-Aug-06 15:38
TheCardinal10-Aug-06 15:38 
AnswerRe: formatted label in winforms? [modified] Pin
Andy Moore10-Aug-06 16:47
Andy Moore10-Aug-06 16:47 
GeneralRe: formatted label in winforms? Pin
TheCardinal10-Aug-06 23:41
TheCardinal10-Aug-06 23:41 
GeneralRe: formatted label in winforms? Pin
Andy Moore11-Aug-06 7:00
Andy Moore11-Aug-06 7:00 
AnswerRe: HTML formatted label in winforms? Pin
Suelinda_W17-Aug-06 4:08
Suelinda_W17-Aug-06 4:08 
Questioncode performance. Pin
uglyeyes10-Aug-06 15:32
uglyeyes10-Aug-06 15:32 
AnswerRe: code performance. Pin
Ennis Ray Lynch, Jr.10-Aug-06 15:45
Ennis Ray Lynch, Jr.10-Aug-06 15:45 
GeneralRe: code performance. Pin
uglyeyes10-Aug-06 16:19
uglyeyes10-Aug-06 16:19 
GeneralRe: code performance. Pin
Dave Kreskowiak10-Aug-06 16:43
mveDave Kreskowiak10-Aug-06 16:43 
GeneralRe: code performance. Pin
Paul Conrad10-Aug-06 19:34
professionalPaul Conrad10-Aug-06 19:34 
GeneralOften Pin
Ennis Ray Lynch, Jr.10-Aug-06 17:14
Ennis Ray Lynch, Jr.10-Aug-06 17:14 
QuestionTransparent TabControl Help! Pin
Limey42010-Aug-06 15:17
Limey42010-Aug-06 15:17 
QuestionHow to detect File Transfer End on File Watcher Pin
Bharat Gadhia10-Aug-06 14:03
Bharat Gadhia10-Aug-06 14:03 
AnswerRe: How to detect File Transfer End on File Watcher Pin
Dave Kreskowiak10-Aug-06 16:46
mveDave Kreskowiak10-Aug-06 16:46 
QuestionPrint the dataGrid Pin
kalyanPaladugu10-Aug-06 12:03
kalyanPaladugu10-Aug-06 12:03 
QuestionProject settings Pin
allenmpcx10-Aug-06 12:03
allenmpcx10-Aug-06 12: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.