Wrox Programmer Forums
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 11th, 2008, 10:29 AM
Registered User
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default OleDbDataAdapter Problem

I have an Select OleDbDataAdapter that I am using to return fields from an Access Database. It is inside of another DataAdapter. The first time it executes it works perfectly but if I try to execute it again with another key it returns the same value

Here is the code:
                        txtItemNum(z) = ds.Tables("PODetail").Rows(z).Item(i)
                        itemSelect = txtItemNum(z)
                        Dim sqlstring As String = _
                        String.Format("SELECT * from [Raw Materials] Where [ProductID#New] = '{0}'", _
                        Dim filler As Integer
                        dc = New OleDb.OleDbDataAdapter(sqlstring, con)
                            filler = dc.Fill(ds, "ItemDesc")
                        Catch ex As Exception
                            MsgBox(" Item Description Exception" + filler)
                        End Try
                        txtDescriptionIn = ds.Tables("ItemDesc").Rows(0).Item(2)
                        'txtItemDesc(z) = ds.Tables("ItemDesc").Rows(0).Item(2)
                        txtItemDesc(z) = txtDescriptionIn
                        dc = Nothing

Debug shows the select where having the new values but the item Description is always the same

Thanks in advance for the help
I am at a loss to figure out why

Bob Anderson
IT Guy
New London OHio

Similar Threads
Thread Thread Starter Forum Replies Last Post
OleDbDataAdapter Help mirage456 General .NET 1 July 5th, 2007 02:11 PM
database paging using asp table+ oledbdataadapter yamensaleh ASP.NET 2.0 Basics 0 January 27th, 2007 10:09 AM
OleDbDataAdapter myNameIsRon ADO.NET 2 June 9th, 2005 04:16 PM
DataSet and OleDbDataAdapter ? justin_min ADO.NET 2 November 22nd, 2004 10:23 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.