Problems in vb.net
Posted by: Kevin De Bruyn
Date: October 05, 2006 02:49AM

Hey, I made this according to what I read during the past few days. Now I just wanted to get the data from the database in to the data grid, but it doesn't work. This is my code:

Imports MySql.Data.MySqlClient
Public Class DBManager
Private CStri As String = "Data Source=localhost;Database=id;User ID=id;Password=passw;Allow Zero Datetime=true;"
Private Conn As New MySqlConnection()
Private Sub DBManager_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Conn.ConnectionString = CStri
Conn.Open()
Dim query As New MySqlDataAdapter("SELECT * FROM users", Conn)
Dim dataset As New DataSet
query.Fill(dataset)
dbView.DataSource = dataset.DefaultViewManager
End Sub
Private Sub DBManager_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Leave
Conn.Close()
End Sub
End Class

It says there's a problem with the date/time value conversion to datetime or something in vb.
I looked on google to solve this, but didn't find a solution.

Can anyone help me with this ?

Options: ReplyQuote


Subject
Written By
Posted
Problems in vb.net
October 05, 2006 02:49AM
October 05, 2006 02:53AM
October 06, 2006 12:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.