Results 1 to 2 of 2

Thread: how do i use datagrid to display my records in the Access DB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2004
    Posts
    128

    how do i use datagrid to display my records in the Access DB

    hi, how do i display all my record in the Access DB using a Datagrid...can anyone help me with the codes

    this is my coding:

    Dim SQL As String
    Dim cmbRS As ADODB.Recordset
    Dim Cnn As ADODB.Connection
    Dim RS As ADODB.Recordset
    Dim sqlstr As String

    sqlstr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\" & DataEnteries.DBname.Text

    Set Cnn = New ADODB.Connection
    Cnn.Open sqlstr

    SQL = "SELECT * FROM " & month.Text & ""
    Set RS = New ADODB.Recordset
    RS.Open SQL, Cnn, adOpenDynamic, adLockOptimistic
    Set DataGrid1.DataSource = RS

    got error: the rowset is not bookmarkable

    Ah Xing
    << Ah XinG AlWaYs HeRe To RoCK U Up >>

  2. #2
    Member
    Join Date
    Jul 2003
    Location
    UK
    Posts
    60
    Take a look at MS KB articles Q278408 and Q189668

    Nick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width