Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with typed datasets

Status
Not open for further replies.

josecarlo

Programmer
Aug 22, 2000
30
PE

Hello all,

I wanted to create a typed dataset, I mean, my own dataset class derived from the DataSet class. To do this, I created an asp.net web application using vb.net. Then I right-clicked the project, clicked Add/Add Class and I chose the DataSet template. Then I drag a table from the Server Explorer into the designer.
Finally, I used the following code in the main web form to retrieve data from a database and put it into the data set, but it's not working!

Dim conn As New OracleConnection
(ConfigurationSettings.AppSettings("connstr"))
conn.Open()

Dim da As New OracleDataAdapter("select * from sector", conn)

Dim ds As New dsSector() 'my own dataset class
da.Fill(ds, "consulta")

Response.Write("nro. de filas: ")
Response.Write(ds.Tables(0).Rows.Count)
Response.Write(ds.SECTOR.Rows.Count)

conn.Close()

It doesn't show me any error, but it is not returning any row.
Can anybody help me with this problem?

Thanks





JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top