CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: create a recordset / database table

Threaded View

  1. #1
    Join Date
    May 2005

    disconnected recordset

    im trying to create a disconnected recordset to be the record source of a data control.
    so i wrote-
    Dim rs As New ADODB.Recordset
    rs.ActiveConnection = Nothing
    rs.CursorLocation = adUseClient
    rs.LockType = adLockBatchOptimistic
    rs.fields.Append "name", adBSTR, 30
    rs.fields.Append "last", adBSTR, 30
    rs.fields("name") = "x"
    rs.fields("last") = "y"
    Data1.RecordSource = rs

    but im getting the runtime error-> "type mismatch"
    how can i do that? whats wrong?
    thanks in advanced.
    Last edited by ppl1; September 27th, 2005 at 02:03 AM. Reason: a change

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)