Boss,
You should use a component named :
"Microsoft ADO Data Control 6.0"
This control works best for Data Grid Flex.
1. DRAW ADO CONTROL.
2. RIGHT CLICK on ADO CONTROL.
3. Set Properties.
4. Now Click on Data Grid set it's Datasource property to "adodc1".
5. The Problem will be solved.
If you wish to connect through ADO Code then use :
down load reference " Microsoft Activex Dataobjects 2.0 Library"
Now type following code:
Dim con as new adodb.connection
dim rs as new adodb.recordset
Private sub form_load()
set con = new adodb.connection
with con
.connectionstring = "provider= Microsoft jet 2.0; filename= " 'enter file name
.connectiontimeout = 5
.cursor location = aduseclient
.open
end with
end sub
private sub cmdsave_click() 'cmdsave is name of save command button
rs.open "select * from emp", con, adopendynamic, lockoptimistic, adcmdtext
rs!empno = text1.text 'empno is database field
rs!absg = text2.text
rs.update
set datagrid1.datasource = rs.datasource ' where rs is recordset that you've create.
'and datagrid1 i name of data grid.
end sub
This will Solve your Problem. Enjoy
JAVED KHAN
IT EXECUTIVE
javed4shab@gmail.com