473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

What now?...Dataset issue

I have the code below that I am using to load a dataset
from and Oracle DB table called PARTNER (SNB).

I then wish to load the information into a drop down but I
am getting lost near the end of the code...I have it
clearly marked below.

Imports System.Data.OleDb

Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents drpPartners As
System.Web.UI.WebControls.DropDownList

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
'Create the data connection.

Dim oleDbConn As New OleDb.OleDbConnection
("Provider=OraOLEDB.Oracle.1;Password=xxxxxx;Persi st
Security Info=True;User ID=xxx;Data Source=xxxxx")
Dim strSQL As String
strSQL = "SELECT PARTNER.PARTNER_NAME_01,
PARTNER.PARTNER_CD, PARTNER.PARTNER_TYPE_CD FROM
SNB.PARTNER PARTNER WHERE PARTNER.PARTNER_TYPE_CD = '03'
ORDER BY PARTNER.PARTNER_NAME_01"
Dim dbAdapt As New OleDb.OleDbDataAdapter(strSQL,
oleDbConn)
Dim dsPartners As New DataSet()
dbAdapt.Fill(dsPartners, "Partner")
'Display the table in a data grid using date binding

***Now here I am trying to follow an example I have
seen.***
'Dim rowNext As dsPartners.XXXX

****First: Intellisense does not seem to pick up and of
the tables I put in for dsPartners and No matter what I
put in for XXXX ...I get an error saying it is "undefined".
********

End Sub

End Class

**********I would greatly appreciate any help. I am
obviously new at .NET (with experience in ASP). However.
there must be something I am missing here.*****

Thanks,

Phil Lamey
Jul 19 '05 #1
1 1465
If you want to bind the data in the data set to a
datagrid try this :
DataGrid1.DataSource = dsPartners.Tables("Partner")

if you're doing a asp page put
datagrid1.databind
after that statement
Aaron
-----Original Message-----
I have the code below that I am using to load a dataset
from and Oracle DB table called PARTNER (SNB).

I then wish to load the information into a drop down but Iam getting lost near the end of the code...I have it
clearly marked below.

Imports System.Data.OleDb

Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents drpPartners As
System.Web.UI.WebControls.DropDownList

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
'Create the data connection.

Dim oleDbConn As New OleDb.OleDbConnection
("Provider=OraOLEDB.Oracle.1;Password=xxxxxx;Pers ist
Security Info=True;User ID=xxx;Data Source=xxxxx")
Dim strSQL As String
strSQL = "SELECT PARTNER.PARTNER_NAME_01,
PARTNER.PARTNER_CD, PARTNER.PARTNER_TYPE_CD FROM
SNB.PARTNER PARTNER WHERE PARTNER.PARTNER_TYPE_CD = '03'
ORDER BY PARTNER.PARTNER_NAME_01"
Dim dbAdapt As New OleDb.OleDbDataAdapter(strSQL,
oleDbConn)
Dim dsPartners As New DataSet()
dbAdapt.Fill(dsPartners, "Partner")
'Display the table in a data grid using date binding

***Now here I am trying to follow an example I have
seen.***
'Dim rowNext As dsPartners.XXXX

****First: Intellisense does not seem to pick up and of
the tables I put in for dsPartners and No matter what I
put in for XXXX ...I get an error saying it is "undefined".********

End Sub

End Class

**********I would greatly appreciate any help. I am
obviously new at .NET (with experience in ASP). However.there must be something I am missing here.*****

Thanks,

Phil Lamey
.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris Dunaway | last post by:
Since I cannot seem to find another group for posting ADO.Net questions, I'll ask here. I can create a query that will return a DataSet with one or more tables in it. Is it possible to execute...
1
by: Andy | last post by:
Hello, I have a WebService that sends a client a DataSet as XML (I use a DataSet.GetXml to get the XML). The DataSet is filled by a DataAdapter in the WebService. The client coverts the XML Back...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
26
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using...
1
by: Fleckman | last post by:
I have a situation where I need to add rows to tables with a Parent-Child relationship which presents a constraints violation when I reject the changes. Here is the scenario: I add a row to a...
1
by: microsoft.news | last post by:
Has anyone seen this? We are porting a web application from .NET 1.1 to 2.0 beta, and receiving errors "The type <dataset> already contains a definition for <event handler>" Looks like the error...
3
by: Bob Day | last post by:
Using vs2003, vb net. Why does DS>DataSetName return the base name DS_Caller_Base instead of the instantiated Name of DataSet1? See '**** for the line in question. Friend sub1 '...
1
by: MuZZy | last post by:
Hi, My problem is the following: i have a class like: class c{ public DataSet m_dsFirst; public DataSet m_dsSecond; public string m_sName; void c() {
3
by: David P. Donahue | last post by:
I'm re-writing an application in C# that was originally written in Delphi 7. The heart of the application is a DataSet displayed in a DataGrid. One of the main functions of the previous...
7
by: =?Utf-8?B?ZG91Zw==?= | last post by:
Have loaded balanced web servers that we do not allow to connect to our database. Content is created and pushed to these sites. I want to add a web service that may get multiple requests a second...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.