Now I have to use DBGrid to edit and retrieve from the database.
So how can I do that in VB6.0?.So kindly reply me anyone quickly.
So how can I do that in VB6.0?.So kindly reply me anyone quickly.
Private Sub Command1_Click() rs0.opend "select * from table ", Conn db.DataSource = rs0 End Sub
Private Sub Command1_Click() rs0.opend "select * from table ", Conn db.DataSource = rs0 End Sub
dim Rs0 as new Adodb.Recordset dim Conn as new Adodb.Connection Conn.open " Connection String" ssql="select * from table1" rs0.open ssql,Conn with grd do while rs0.eof=false .rows=.rows+1 .textmatrix(.rows,1)=rs0("fiildname") &"" .textmatrix(.rows,2)=rs0("fiildname") &"" rs0.movenext loop rs0.close:set rs0=nothing end with
dim Rs0 as new Adodb.Recordset dim Conn as new Adodb.Connection Conn.open " Connection String" ssql="select * from table1" rs0.open ssql,Conn with grd do while rs0.eof=false .rows=.rows+1 .textmatrix(.rows,1)=rs0("fiildname") &"" .textmatrix(.rows,2)=rs0("fiildname") &"" rs0.movenext loop rs0.close:set rs0=nothing end with
.rows=.rows+1 .textmatrix(.rows,1)=rs0("fiildname") &"" .textmatrix(.rows,2)=rs0("fiildname") &""
.rows=.rows+1 .textmatrix(.rows,1)=rs0("fiildname") &"" .textmatrix(.rows,2)=rs0("fiildname") &""
Comment