vb.net - Data tables failed to join together with SQL JOIN INNER command -
i'm trying join 2 data tables in vb contained in same ms access database file , process series of data binding process new merged table system return me error message says following:
an unhandled exception of type 'system.data.oledb.oledbexception' occurred in system.data.dll
additional information: cannot join on memo, ole, or hyperlink object (students.stid=grades.stid).
the following code:
private sub form3_load(sender object, e eventargs) handles mybase.load dim constr string = "provider = microsoft.ace.oledb.12.0;" & "data source = c:\users\johnnycheng\documents\gradebook.accdb" dim sqlstr1 string = "select firstname, lastname students inner join grades on students.stid = grades.stid" dim da = new oledb.oledbdataadapter(sqlstr1, constr) dim dset new dataset() dim source new bindingsource() da.fill(dset) da.dispose() source.datasource = dset.tables(0) bindingnavigator1.bindingsource = source stidbox.databindings.add(new binding("text", source, "stid", true)) firstnamebox.databindings.add(new binding("text", source, "firstname", true)) lastnamebox.databindings.add(new binding("text", source, "lastnmae", true)) firstexambox.databindings.add(new binding("text", source, "firstexam", true)) secondexambox.databindings.add(new binding("text", source, "secondexam", true)) finalexambox.databindings.add(new binding("text", source, "finalexam", true)) averagebox.text = (cdbl(firstexambox.text) + cdbl(secondexambox.text) + cdbl(finalexambox.text) * 2) / 4 end sub
can me out problem? thank you.
Comments
Post a Comment