demausdauth's Profile User Rating: -----

Reputation: 190 Stalwart
Group:
Expert
Active Posts:
689 (0.34 per day)
Joined:
03-February 10
Profile Views:
15,172
Last Active:
User is offline Aug 21 2015 06:21 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Saturn
Dream Kudos:
50
Icon   demausdauth Getting frustrated with paydays -- nothing left :(

Posts I've Made

  1. In Topic: How do I get a hiddenfield id name in default.aspx.cs?

    Posted 14 Aug 2015

    What does your question pertain to - need more info.
  2. In Topic: Why my databse is not updating ?

    Posted 7 Aug 2015

    Have you tried debugging - put a break point just after the ExecuteNonQuery and see if that returns a value.
  3. In Topic: Using A CDN for script files vs Local scripts

    Posted 7 Aug 2015

    Also using a CDN you are can be using latest version all the time without needing to update your code.
  4. In Topic: AccessDB, CheckedListBox, SelectedValue - Not changing.

    Posted 27 Jul 2015

    Is it perhaps how your data is saved? What does the Categories table contain? How are your categories tied to your recipes?
  5. In Topic: Crazy ODBCDataReader

    Posted 24 Jul 2015

    You are trying to read the from the database twice; the data adapter is one method of reading from the database and the data reader is a second method. Most likely by the time your code reaches the data reader the connection may have already been closed or used. You should choose one method that works for you.

    Not the most elegant but...


    This method uses a ODBC data reader to fill a dataset.
            Public Function PaeseLeaveDataReader(ByVal textValue As String) As DataSet
    
                Dim returnData As New DataSet
    
                Using oConnection As New OdbcConnection("dsn=PHOENIXDB;uid=SYSDBA;pwd=masterkey;")
                    Using oCommand As New OdbcCommand("SELECT DISTINCT * FROM TBL_COMUNI WHERE COMUNE= @Comune")
    
                        oCommand.Parameters.AddWithValue("@Comune", textValue)
    
                        Try
                            returnData.Load(oCommand.ExecuteReader, LoadOption.OverwriteChanges, vbEmpty)
                        Catch ex As Exception
                            MessageBox.Show(String.Format("Error: {0}: {1}", ex.Source, ex.Message), "Filling DataSet From Reader")
                        End Try
    
                    End Using
                End Using
    
                Return returnData
            End Function
    
    
    



    This method makes use of the data adapter object to fill the data set.

           Public Function PaeseLeaveDataAdapter(ByVal textValue As String) As DataSet
                Dim returnData As New DataSet
    
                Using oConnection As New OdbcConnection("dsn=PHOENIXDB;uid=SYSDBA;pwd=masterkey;")
    
                    Using oAdapter As New OdbcDataAdapter("SELECT DISTINCT * FROM TBL_COMUNI WHERE COMUNE= @Comune", oConnection)
    
                        oAdapter.SelectCommand.Parameters.AddWithValue("@Comune", textValue)
    
                        Try
                            oAdapter.Fill(returnData)
    
                        Catch ex As Exception
                            MessageBox.Show(String.Format("Error: {0}: {1}", ex.Source, ex.Message), "Filling DataSet From Adapter")
                        End Try
    
    
                    End Using
                End Using
    
                Return returnData
            End Function
    
    
    


    And how to use each of those above methods.

           Public Sub LeaveToDo()
    
                Dim dsReader As New DataSet
                dsReader = PaeseLeaveDataReader("text")
    
                Dim dsAdapter As New DataSet
                dsAdapter = PaeseLeaveDataAdapter("text")
    
               
            End Sub
    
    


    The Using construct will automatically close and dispose of the connection and command objects for you.

My Information

Member Title:
D.I.C Addict
Age:
Age Unknown
Birthday:
February 2
Gender:
Location:
Minnesota
Interests:
my family, reading, programming, DDO
Full Name:
Aaron
Years Programming:
8
Programming Languages:
VB.NET, C#.NET, ASP.NET, SharePoint 2007 - 2010 development,
Javascript

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    .nethelp Icon

    07 Apr 2012 - 14:31
    why did u put -1 on my reputation coz u know better? werent u like me before ? thanks anyways this truely shows ur good spirit and what a good mentor u are .
    bye
  2. Photo

    .nethelp Icon

    07 Apr 2012 - 14:31
    why did u put -1 on my reputation coz u know better? werent u like me before ? thanks anyways this truely shows ur good spirit and what a good mentor u are .
    bye
  3. Photo

    Guest 

    29 Jun 2010 - 13:54
    http://www.dreamincode.net/forums/topic/179550-updatepanels-placeholders-and-usercontrols/
  4. Photo

    joker_1 Icon

    13 Jun 2010 - 21:37
    Hi quick question.. What is the "e" argument??
    thanks heaps
  5. Photo

    demausdauth Icon

    11 Jun 2010 - 06:05
    lol -- not trying to break any records
  6. Photo

    CharlieMay Icon

    10 Jun 2010 - 18:31
    Just wanted to say, you keep answering questions like you do and your rep is going to sky-rocket.
Page 1 of 1