Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Connecting to a mySQL server and filling tables with VB - simple help!

Options
  • 03-03-2007 7:54pm
    #1
    Registered Users Posts: 4,946 ✭✭✭


    yo! I've got my program to connect to a mysql server - woop!

    heres the stuff

    Dim conn As MySqlConnection
    Dim sql As String
    Dim da As New MySqlDataAdapter
    Dim ds As DataSet

    conn = New MySqlConnection()
    conn.Open()

    sql = "SELECT * FROM tblEvents"
    da = New MySqlDataAdapter(sql, conn)
    da.Fill(ds, "ClanStuff") <
    This gives error!
    conn.Close()

    It says 'Value cannot be null parameter name dataset'

    Does that mean that i have null data in my DB and its not able to produce it in the program? I've filled a row of data in the DB and that end of stuff looks grand.

    Any help would be great! Cheers


Comments

  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    This is a total guess on my part but you may need to initialise ds
    Dim ds As DataSet


  • Registered Users Posts: 4,946 ✭✭✭red_ice


    Dim ds As DataSet becomes Dim ds As New DataSet

    urgh.


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    red_ice wrote:
    Dim ds As DataSet becomes Dim ds As New DataSet

    urgh.
    That fixed it? I haven't a clue tbh never seen a line of VB code in my life - must say I don't like it much :)


Advertisement