I have DataGridView in maxscript, I try to connect Maxscript to MS access using Ole, the problem is DGV not display any data from data base,
hope someone can tell me is someting wrong with my code, here my code
rollout TEST “TEST” width:522 height:352
(
dotNetControl DGV “System.Windows.Forms.DataGridView” pos:[44,28] width:351 height:211
on AAA open do
(
DB = “D:\Pixeluv\Project\AA\DataDept\Eps\TEST\DB.mdb”
Local CONString = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=”
Local CON = dotNetObject “System.Data.OleDb.OleDbConnection”
Local Cmd = dotnetobject “System.Data.OleDb.OleDbCommand”
Local DA = dotNetObject “System.Data.OleDb.OleDbDataAdapter”
Local DS = dotnetobject “System.Data.DataSet”
Local DV = dotnetobject “System.Data.DataView”
SQL = "Select * FROM AsetT"
CON.ConnectionString = (CONString + DB)
Con.Open
Cmd.CommandText = SQL
Cmd.Connection = Con
DA.SelectCommand = Cmd
DA.Fill DS "ASET"
Con.close
DV = DS.Tables.Item[0]
DGV.DataSource = DV
)
)
CreateDialog TEST