Results 1 to 2 of 2

Thread: question about the adodata control???

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    9

    Post

    Say you got a adodc (data control). And, you dont want to set the properties at design time. i.e. connectionstring, table and so forth. Rather, you want to do it at
    run time. Here is what i did:

    adodc1.recordset.open "tablename",_
    connectstring,_
    etc..,etc..

    should work...right?

    The error is telling me that the object
    variable or with block variable is not set.
    I know that this means:
    set obj = whatever, but how in the heck
    can you did this when there is nothing
    to set it to. (i.e. your trying to create
    a recordset,not set adodc.recordset = to
    another one.)


  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    The recordset object has not been instantiated by the data control yet. Use this code instead:

    Code:
        With Adodc1
            .ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=Nwind.mdb"
            .RecordSource = "Select * from Customers"
            .Refresh
        End With

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