Question biniding data to a datagrid

makdu

Member
Joined
Sep 2, 2009
Messages
7
Programming Experience
Beginner
i am connecting to a foxpro table using adodb connection . Using this I am trying to fill a datagrid values using binding. if any one know the syntax for binding source , please let me know
Here is what i tried with
VB.NET:
fcn = New ADODB.Connection
        fcn.ConnectionString = "provider=VFPOLEDB.1;Data Source= D:\" & foldrname
        fcn.Open()
rst = New ADODB.Recordset
rst.open("select * from table" ,fcn)
              BindingSource1.DataSource = rst
                DataGridFirst.ReadOnly = True
                DataGridFirst.DataSource = BindingSource1
rst.Close()
I am getting exceptions
 
I moved to oledb connection in place of adodb connection and the problem got resolved
VB.NET:
 newn = New OleDbConnection
        newn.ConnectionString = "provider=VFPOLEDB.1;Data Source= D:\" & shopname
        newn.Open()

:cool::)
 
Back
Top