VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 307,153 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,664 people online right now. Registration is fast and FREE... Join Now!




Data

 

Data

ZRonZ

13 Aug, 2009 - 01:58 PM
Post #1

New D.I.C Head
*

Joined: 9 Jan, 2009
Posts: 44



Thanked: 1 times
My Contributions
I am trying to capture information on an item from a different database table than the item. The code works but the m_daFRZadapter.Fill(m_dtFRZ) seems to be appending the new data to the dataset. After going through the first 3 parts, m_dtFRZ.Rows.Count = 3. Is there something I need to do to empty the data table before I rerun the query and reload the dataset?

CODE

        Dim sString As String = RTrim(txtItemNo.Text)

        m_cnFRZConn.ConnectionString = "Data Source=KEMI-FJ89SF1\RONSQL;Initial Catalog=Dump1;Integrated Security=True"
        m_cnFRZConn.Open()

        MyStr = "Select item, freeze_date, comp_matl From dump1.dbo.FrzCost072709 where item like '" & sString & "'"
        m_daFRZadapter = New SqlDataAdapter(MyStr, m_cnFRZConn)
        m_cbFRZCmdBldr = New SqlCommandBuilder(m_daFRZadapter)
        m_daFRZadapter.Fill(m_dtFRZ)


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:06PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month