Visual Basic .NET and ADO.NET code - Disconnected Updating Help 
Author Message
 Visual Basic .NET and ADO.NET code - Disconnected Updating Help

All,
I am trying to do something I thought was easy, updating a datarow in Access
using the disconnect method.  Here is an example of what I am using.  For
example if I wanted to update field "ProductName" in row(0) with a differnt
value.  How would I implement it in this code?  I have tried differnt things
but it will not update.

Imports System.Data.OleDb

    Sub Main()

        Dim objConn As New OleDbConnection _
            ("Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "User ID=Admin;" & _
            "Data Source=C:\Program Files\Microsoft" & _
            "Office\Office10\Samples\Northwind.mdb")

        objConn.Open()

        Dim objAdapter As New OleDbDataAdapter _
            ("SELECT * FROM Products", objConn)
        Dim objDataSet As New DataSet()

        objAdapter.Fill(objDataSet)

        With objDataSet.Tables("Table").Rows(0)

            Console.Write(.Item("ProductName") & ", " _
                & .Item("UnitsInStock"))

        End With

    End Sub



Sat, 30 Apr 2005 07:20:23 GMT  
 Visual Basic .NET and ADO.NET code - Disconnected Updating Help

Hello,

Thank you for using the Microsoft Newsgroups.

Please refer to:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;313483

If you have any questions, please reply to this post.

Regards,  

Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 01 May 2005 15:09:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Write JScript .NET or Visual Basic .NET code directly inside IE

2. Visual Studio.NET vs Visual Basic.NET

3. Visual C++.NET ADO.NET PROGRAMMING

4. Visual Basic.NET , ASP or ASP.NET

5. Upgrade from Visual Basic 6 webclasses to VB.NET/ASP.NET

6. do Visual Basic 6.0 and Visual Basic .NET version beta Working Both

7. Difference between Visual Basic 6 and Visual Basic.Net

8. Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic.NET

9. ADO.NET with ASP.NET using VB.NET

10. Sprite graphic sample code with Visual Basic.Net standard

11. Can't Use Sample Code CD from Programming Visual Basic .Net (Balena)

12. ANN: MS Code Advisor for Visual Basic (6.0 to .NET)

 

 
Powered by phpBB® Forum Software