|
-
May 5th, 2010, 07:16 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How do I populate an array while creating a datatable? Breaking it up instead of fill
I want to modify this function to populate an array with each item in the database.
I have tried various options, but I just can't get it to work
Private Function ConnectMe() As DataTable
Dim conn As String = "Server=192.168.0.36;Port=3306;Database=wswc;Uid=root;Pwd=Jack"
Dim cmd As String = "SELECT * FROM st_users"
Dim ad As New MySql.Data.MySqlClient.MySqlDataAdapter(cmd, conn)
Dim topics As New DataSet()
ad.Fill(topics)
ConnectMe = topics.Tables(0)
End Function
Instsead of fill, I want to one by one add it to the dataset and also an array
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|