0

Hi all.
I am trying to add a record into the database wothout much success. sometimes it works and sometimes it returns error "overflow exception unhandled"
And even the database is not all the time updated.
How do you add the Datatimepicker value into the database...?

Will really appreciate help on this.
Thanks
Pl check my code..

Me.Validate()
        frmedit.AlumniTBLTableAdapter.Insert(Me.TextBox2.Text, _
        Me.TextBox3.Text, DateTimePicker1.Value.ToShortDateString, Me.TextBox5.Text, _
        Me.TextBox6.Text, DateTimePicker2.Value.ToShortDateString, DateTimePicker3.Value.ToShortDateString, _
        Me.TextBox9.Text, Me.TextBox10.Text, Me.TextBox11.Text, _
        Me.TextBox12.Text, Me.TextBox13.Text)
        'frmedit.AlumniTBLTableAdapter.Update(frmedit.AlumniDBDataSet.AlumniTBL)
        frmedit.AlumniTBLTableAdapter.Fill(frmedit.AlumniDBDataSet.AlumniTBL)

        MsgBox("Records added")

I'm using VS 2008 and MsAccess as my database connected through the database connection wizard

2
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by chanthung
0

Incorrect date formats will result in an error. Try the following -

'.... code....
DateValue('" & DateTimePicker1.Value & "'",
0

Thanks, wl sure try this...

one more thing...why is my MsAccess database not retaining the datas added few minutes earlier...just dissapears after sometime after datas been added at runtime...???

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.