473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Update Access 2003 with DataGridView ADO.NET 2.0

Hi,

I have a form with DataGrid view and details and its working fine.
In the sepaerate button I want to update the database table columns. The
value comes from AS400 and inserted into string variable then my update works
and updates only DataGridView but not actual MS Access Database. Here is the
code:

Dim row As DataRow
For Each row In Me.DsKKAUTO.tbl_CREDIKOMAUTO.Rows
Dim mKKAUTO As String = ""
mKKAUTO = Trim(row(2))

Dim mTOK As String = ""
mTOK = Trim(row(9))

'SORT THE TEMP TABLE
Dim mEXPR1 As String = "(KKAUTO = '" & mKKAUTO & "') AND
(TOK = '" & mTOK & "')"
Dim mSORT1 As String = "KKAUTO ASC"

Dim tmpResultROWS As DataRow()
tmpResultROWS = Nothing
tmpResultROWS = dsAS400DOV.Tables(0).Select(mEXPR1,
mSORT1)

If tmpResultROWS.Length = 0 Then
'Do Nothing In Here
Else
If tmpResultROWS.Length = 1 Then
row.BeginEdit()
row.Item(11) = "True"
row.EndEdit()
Else
'Do Nothing In Here
End If
End If
Next

Me.DsKKAUTO.tbl_ CREDIKOMAUTO.AcceptChanges()

Me.Tbl_CREDIKOMAUTOTableAdapter.Update(Me.DsKKAUTO .tbl_CREDIKOMAUTO)
Does anyone knows why I can update my DataGridView and not the actual MS
Access 2003 Table?

Thank you very much for reading my post.

Rgds,
GC
Sep 29 '06 #1
0 1446

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: thomasp | last post by:
I know this is a vague question, but I am not sure what information to give. I am using VB2005 beta and the datagridview is pulling data from one of three tables in an Access database. For some...
0
by: William LaMartin | last post by:
I have just moved from Visual Studio 2003 to 2005 and am having a bit of trouble with saving changes in a dataviewgrid to the underlying Access database table. I thought I had all of this worked...
6
by: Greg P | last post by:
I am using VS2005 and have been learning a ton about databinding. I know that when you drag a view from the datasource window (creating a dataGridView) that an update method is not added to the...
3
by: Bob | last post by:
Hi, FrameWork 2.0 Quick and dirty job so I thought I would do it all on the UI as quick and easy as possible. I got the datagridview to display my Access databaseview by using the Datasources...
5
by: explode | last post by:
I made a procedure Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) that creates a new oledbDataAdapter with insert update select and delete commads. I also added that commands can...
3
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I have a DataGridView that displays data from one table from database. I didn’t implement any my code, I just used wizard to do all the work with DatagridView populating. Visual Studio...
13
by: Terry Olsen | last post by:
I'm using OleDb to connect with an Access Database. I have anywhere from 10 to over 100 records that I need to either INSERT if the PK doesn't exist or UPDATE if the PK does exist, all in a single...
1
by: alexander.stuckenholz | last post by:
Hi folks, I have a datagridview with custom update-method where I access the this.Rows property directly. I have no bindingsources, datatsets or anything (and it would cost me a lot of work to...
0
by: bharathi228 | last post by:
Hi, iam working with windows application.here my requirement is binding data to database from a datagridview. next i want to update some rows in datagridview and update it to the database.for...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.