Marc Fauser
5/2/2002 3:08:00 PM
Steven Bras [MS] <stevenbr@online.microsoft.com> wrote:
> Yes, you can use an ODBCConnection, and an ODBCDataAdapter to fill a
> dataset. You can then move forward and backward through that dataset
> as necessary. Here's an example in VB:
>
> Dim oCn As New
> SqlConnection("server=(local);database=northwind;user id=me;")
> Dim oDa As New SqlDataAdapter("SELECT * FROM Customers", oCn)
> Dim oDs As New DataSet()
>
> oDa.Fill(oDs, "Customers")
>
> Dim oDr As DataRow
>
> For Each oDr In oDs.Tables("Customers").Rows
> ListBox1.Items.Add(oDr.Item(0))
> Next
>
> This sample loads a value from the dataset into a listbox, for
> example.
Ok. Your example works fine if you use SqlConnection and SqlDataAdapter.
But I cannot get it to work with OdbcConnection as OdbcDataAdapter. Can
you give me an example for this one?
Best regards,
Marc Fauser