Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: Datagrid question


Message #1 by "Jennie Frizelle" <jfrizelle@d...> on Thu, 31 Oct 2002 17:39:50
Hi

I am reading one record from a database, based on a customer name selected
by the customer from a dropdown list. When the Search button is clicked, I
want to pull back other information (Phone, Fax, Account Number) from the
database for that customer and display the results on my web form.

I've tried a mixture of different things but am getting more confused as I
go. Any help would be great.

This is where I've got to so far, now I can't figure out how to access the
information in myReader.


Dim oConn As New OdbcConnection("DSN=Ulysses")

Dim oCMD As OdbcCommand = New OdbcCommand("SELECT CUSTOMER_NAME, PHONE,
FAX, ACCOUNT_NO FROM CUSTOMER WHERE CUSTOMER_NAME = '" &
lstCustName.SelectedItem.Value & "'", oConn)

oConn.Open()

Dim myReader As OdbcDataReader = oCMD.ExecuteReader

Please help!
Jennie.

  Return to Index