Answered by:
OleDbException Really need some help

Question
-
So I'm trying to save my data set into my database
what is not working : The decimal in column 1
What I've tried :
- Put the column 1 as integer : it worked
- Set the column to any decimal precision none work
- Try to deal with the cell validating and do a try parse conclusion the cell type is double but I still get criteria mismatch
- Bang my head to the wall , not worked if you must know
Using con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source = Mokmeuh.accdb") con.Open() Dim cmb As New OleDbCommandBuilder(dAdapter) Try dAdapter.Update(dSet.Tables("Articles_table")) Catch ex As OleDbException Console.WriteLine(ex.InnerException) End Try End Using
The error would be : OleDbException with the error code : -2147217913
wich is a criteria mismatch but the things is I put A DAMN DECIMAL INTO THE CELLL .... i'm really piss I can't see why is not working
the column property named : Price would be
Field size : Decimal
Format : Currency/General (Neither work)
Precision : 15
Scale : 2
I really need some help I need someone ....
- Edited by Mokmeuh Sunday, September 29, 2013 8:34 PM
Sunday, September 29, 2013 7:52 PM
Answers
-
does the table affected have a primarykey?
thanks for any help
- Proposed as answer by Cor Ligthert Monday, September 30, 2013 3:19 PM
- Marked as answer by Leo (Apple) Yang Monday, October 7, 2013 2:04 AM
Sunday, September 29, 2013 9:37 PM
All replies
-
does the table affected have a primarykey?
thanks for any help
- Proposed as answer by Cor Ligthert Monday, September 30, 2013 3:19 PM
- Marked as answer by Leo (Apple) Yang Monday, October 7, 2013 2:04 AM
Sunday, September 29, 2013 9:37 PM -
- Try to deal with the cell validating and do a try parse conclusion the cell type is double but I still get criteria mismatch
What does this mean? Is the column type double or decimal?
What does
dSet.Tables("Articles_table").columns("Price").DataType.Name
return?
Armin
Sunday, September 29, 2013 9:52 PM -
I return decimal type I have checked them that's why I'm confuse I've also tried to push the type who,s supposed to be defined by the dataset but nothing seems to workMonday, September 30, 2013 11:30 AM
-
I would suspect that the parameter data type or the column data type of the Articles_table DataTable is incorrect. How did you create Articles_table?
Paul ~~~~ Microsoft MVP (Visual Basic)
- Edited by Paul P Clement IV Monday, September 30, 2013 11:46 AM spelling
Monday, September 30, 2013 11:46 AM -
I return decimal type I have checked them that's why I'm confuse I've also tried to push the type who,s supposed to be defined by the dataset but nothing seems to work
Did you check what .Paul wrote, if you did not do what he ask (use a primary key in your table) than that is mostly causing this errror.
Success
CorMonday, September 30, 2013 3:19 PM