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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

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

  • 03-03-2007 6:54pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 6,334 ✭✭✭OfflerCrocGod


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


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


    Dim ds As DataSet becomes Dim ds As New DataSet

    urgh.


  • Registered Users, Registered Users 2 Posts: 6,334 ✭✭✭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