בעעעעיה

chanand

New member
בעעעעיה

אני בתחילת דרכי ב.net, מנסה לקשר בין הDB לdatagrid... זה הקוד:
Dim Conn As MySQLConnection = New MySQLConnection(New MySQLConnectionString("***", "***", "***", "***").AsString) Dim cmd As MySQLCommand = New MySQLCommand("SELECT fname,lname FROM tbl ORDER BY LastName, FirstName", Conn) ' The DataSet that holds the data. Dim m_DataSet As DataSet ' Load the data. Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim data_adapter As MySQLDataAdapter ' Create the SqlDataAdapter. data_adapter = New MySQLDataAdapter(cmd) ' Map Table to Contacts. data_adapter.TableMappings.Add("Tblsidornames", "nicknames") ' Fill the DataSet. m_DataSet = New DataSet() data_adapter.Fill(m_DataSet) ' Bind the DataGrid control to the Contacts DataTable. ' Changed by Jim Rogers ([email protected]) dgContacts.SetDataBinding(m_DataSet, "Contacts")​
וזו השגיאה שאני מקבל:
An unhandled exception of type 'MySQLDriverCS.MySQLException' occurred in mysqldrivercs.dll​
בשורה הזו:
data_adapter.Fill(m_DataSet)​
 
למעלה