|
-
Feb 11th, 2004, 08:56 AM
#1
Thread Starter
Hyperactive Member
can not fill dataset
The following is my code:
Dim sql As String = "Select * From tblStudnet"
Dim conString As String = "Driver={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabaseName"
'Create connection object
Dim connection As OdbcConnection = New OdbcConnection(conString)
connection.open()
msgbox"connected"
'Create data connection object
Dim daStudent As OdbcDataAdapter = New OdbcDataAdapter(sql, connection)
'Create a dataset object and fill with data using data adapter's Fill method
Dim dsStudent As DataSet = New DataSet()
dsStudent.Clear()
daStudent.Fill(dsStudent, "tblNewTable")
I got error at last line:
"An unhandled exception of type 'Microsoft.Data.Odbc.OdbcException' occurred in microsoft.data.odbc.dll
Additional information: System error."
Can you help?
Last edited by Palmtree; Feb 11th, 2004 at 11:05 AM.
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
|