Results 1 to 3 of 3

Thread: Cloning a database? Newbie Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2

    Unhappy

    I thought this was the correct way to create a clone of a database. However, I keep getting the message :
    "Object variable or With Block not set. "
    This is just the way that it is shown in VB Help

    Private Sub CmdBackUpDataBase_Click()
    Dim rstTemp As Recordset
    Set rstNewCopy = rstTemp.Clone

    End Sub

    I get the same message with

    Private Sub CmdBackUpDataBase_Click()
    Dim rstTemp As Recordset
    Dim rstNewCopy As Recordset
    Set rstNewCopy = rstTemp.Clone
    End Sub

    Any ideas?

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    88

    Wink

    If you use ADO, you have to instanciate a recordset varible before using it.

    set rs = new recordset

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    What is the point of cloning a recordset object that has no fields or data? Why don't you just create a new recordset or clone an existing one (that contains data)?

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