Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB.NET not updating Access properly

21 views
Skip to first unread message

dpaulovich

unread,
Oct 26, 2010, 11:46:17 AM10/26/10
to
?I am taking data from a datagridview and storing it in an Access 2007 DB
table
using the Datatset/TableAdapter Update command.


'Add rows to Table'

FoodDatabaseDataSet.Meals.Rows.InsertAt(DR, MealsRwCnt)


'Update Data Base'


Try
Me.Validate()
MealsBindingSource.EndEdit()
MealsTableAdapter.Update(FoodDatabaseDataSet.Meals)
Catch ex As Exception
MsgBox(ex.ToString)
End Try


The update works fine storing all data in the Access DB table. The problem
I'm having
is that the data is stored in the DB in integer format instead of decimal
format
(anything less than zero is stored as a zero)

While the app is running and after an update, on another datagridview
populated by the DB data, data is diplayed in decimal format.
It appears that the Dataset.DataTable is updated correctly but not the
ACCESS DB table.


Any help will be appreciated

Thank You

dpaulovich

unread,
Oct 26, 2010, 3:54:07 PM10/26/10
to
?I figured out the problem. Had to set the "Scale" parameters in the Access
database fields.

The "Scale" parameter determines the number of places to the right of the
decimal place.

Learn something new every project.


"dpaulovich" wrote in message
news:CuWdnbRGiYpLalvR...@giganews.com...

0 new messages