Datalist without ADO 
Author Message
 Datalist without ADO

Hi,

I'm trying to populate a Datalist without the use of an ADO object.
However, the Datalist never populates.  The name of the table is "Tests"
and the name of the column that I'm trying to populate the Datalist with is
"Description".  The name of the datalist is "Available Tests".  Here is the
code:

    Dim DataConnection As New ADODB.Connection
    Dim DataRecord As New ADODB.Recordset
    Dim ConnectionString As String

    ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
        "Dbq=C:\home\farrah\alien\databases\test.mdb;" & "Uid=;Pwd="

    DataConnection.Open (ConnectionString)

    Call DataRecord.Open("Tests", DataConnection)

    With AvailableTests
        Set .RowSource = DataRecord
        .ListField = "Description"
        .Refresh
    End With

Thanks,
Farrah



Sat, 23 Oct 2004 21:47:36 GMT  
 Datalist without ADO
Farrah

Set the CursorLocation of recordset or connection object to adUseClient (the
default is adUseServer) and try

Sukesh


Quote:
> Hi,

> I'm trying to populate a Datalist without the use of an ADO object.
> However, the Datalist never populates.  The name of the table is "Tests"
> and the name of the column that I'm trying to populate the Datalist with
is
> "Description".  The name of the datalist is "Available Tests".  Here is
the
> code:

>     Dim DataConnection As New ADODB.Connection
>     Dim DataRecord As New ADODB.Recordset
>     Dim ConnectionString As String

>     ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
>         "Dbq=C:\home\farrah\alien\databases\test.mdb;" & "Uid=;Pwd="

>     DataConnection.Open (ConnectionString)

>     Call DataRecord.Open("Tests", DataConnection)

>     With AvailableTests
>         Set .RowSource = DataRecord
>         .ListField = "Description"
>         .Refresh
>     End With

> Thanks,
> Farrah



Sun, 24 Oct 2004 15:44:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Setting DataList/DataCombo properties- without ADODC

2. How to use DataList without ADOData object?

3. Help moving items in a DataList to Another DataList

4. ADO Datalist

5. refreshing DataList with ADO Data Control

6. How do I refill a datalist after filtering the ado data control

7. ADO: DataList and DataCombo and Datamembers

8. ADO: dataclasses and DataList

9. ADO DataList control

10. DataList and DataCombo using ADO data control

11. HOW TO: Refresh ADO DataList control

 

 
Powered by phpBB® Forum Software