Propulate it

databases Kuwait
  • 18 years ago

    Code:

      Private withevents con as ADODB.Connection
      Private withevents rscons as ADODB.Recordset


      Set con = New ADODB.Connection
      con.ConnectionString = "your connectionstring"
             
      con.Open
      Set rscons = New ADODB.Recordset
      Set rscons.ActiveConnection = con


      rscons.CursorType = adOpenDynamic
      rscons.CursorLocation = adUseClient
      rscons.Open "select * from mytable"
      Set DataGrid1.DataSource = rscons



      I think the datagrid recordset has to be updatable??, hence canNOT set it with a con.execute(select ....) which results in a forward only non-updatable recordset.


    Hope this helps.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard