PDA

Click to See Complete Forum and Search --> : question about the adodata control???


paddlefoot
Jan 19th, 2000, 12:17 PM
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.)

Clunietp
Jan 19th, 2000, 12:31 PM
The recordset object has not been instantiated by the data control yet. Use this code instead:


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