Click here to Skip to main content
15,889,830 members
Home / Discussions / Database
   

Database

 
QuestionConnect to SQL on same machine! help Pin
darXstar30-Sep-05 2:48
darXstar30-Sep-05 2:48 
AnswerRe: Connect to SQL on same machine! help Pin
Colin Angus Mackay30-Sep-05 12:13
Colin Angus Mackay30-Sep-05 12:13 
GeneralRe: Connect to SQL on same machine! help Pin
darXstar3-Oct-05 5:39
darXstar3-Oct-05 5:39 
QuestionSELECTING COLLATION WHEN INSTALLING MSDE. Pin
Bigfootguy29-Sep-05 20:28
Bigfootguy29-Sep-05 20:28 
AnswerRe: SELECTING COLLATION WHEN INSTALLING MSDE. Pin
darXstar30-Sep-05 2:37
darXstar30-Sep-05 2:37 
QuestionTo Bitmask or Not Pin
xsoftdev229-Sep-05 19:35
xsoftdev229-Sep-05 19:35 
AnswerRe: To Bitmask or Not Pin
Russell Jones3-Oct-05 5:59
Russell Jones3-Oct-05 5:59 
QuestionOracle Help Needed - ComboBox data binding Pin
Glenn E. Lanier II29-Sep-05 9:30
Glenn E. Lanier II29-Sep-05 9:30 
I am having some difficulty in getting my .NET application to work as desired using an Oracle database (I am using the Oracle Data Provider for .NET). In particular, my ComboBox no longer contains any items.

I had a SQL table:
CREATE TABLE [dbo].[tblTitles] (<br />
	[TitleID] [int] IDENTITY (1, 1) NOT NULL ,<br />
	[TitleDisplayText] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,<br />
	[TitleHidden] [bit] NULL CONSTRAINT [DF_tblTitles_TitleHidden] DEFAULT (0),<br />
	CONSTRAINT [PK_Titles] PRIMARY KEY  CLUSTERED <br />
	(<br />
		[TitleID]<br />
	)  ON [PRIMARY] <br />
) ON [PRIMARY]


and created a complementary (I think) Oracle table:

CREATE  SEQUENCE  tblTitles_TitleID_SEQ<br />
	START WITH 1<br />
	INCREMENT BY 1<br />
/<br />
<br />
CREATE TABLE tblTitles <br />
(<br />
	TitleID int  NOT NULL , <br />
	TitleDisplayText VARCHAR2 (50)  NULL , <br />
	TitleHidden NUMBER(1)  DEFAULT 0  NULL , <br />
	CONSTRAINT PK_Titles PRIMARY KEY (TitleID) <br />
)


My Code (which worked against SQL Server table, but not against Oracle):

// Create the dataset<br />
DataSet dsTitles = new DataSet("Titles");<br />
OpenConnection(); // creates and opens a new connection or returns existing connection.<br />
OracleCommand tableCommand = null;<br />
tableCommand = dbConnection.CreateCommand();<br />
tableCommand.CommandText = "select TitleID, TitleDisplayText FROM tblTitles WHERE TitleHidden <> 1 ORDER BY TitleDisplayText";<br />
<br />
OracleDataAdapter adapter = new OracleDataAdapter();<br />
adapter.SelectCommand = tableCommand;<br />
adapter.Fill(dsTitles, "Titles"); <br />
<br />
// Bind to ComboBox<br />
comboBoxTitle.BeginUpdate();<br />
comboBoxTitle.DataSource = dsTitles.Tables["Titles"];<br />
comboBoxTitle.DisplayMember = "TitleDisplayText";<br />
comboBoxTitle.ValueMember = "TitleID";<br />
comboBoxTitle.EndUpdate();


If I create an OracleDataReader and execute the query, adding each item to the ComboBox, it displays, but this takes a considerable amount of time.

Any ideas on what I'm doing wrong, or not doing? If this is not the best place to ask, kindly advise a better place.

Thanks,
Glenn
AnswerRe: Oracle Help Needed - ComboBox data binding Pin
Guillermo Rivero3-Oct-05 11:40
Guillermo Rivero3-Oct-05 11:40 
AnswerRe: Oracle Help Needed - ComboBox data binding Pin
Glenn E. Lanier II2-Mar-06 8:33
Glenn E. Lanier II2-Mar-06 8:33 
QuestionWhere should I store my connection string? Pin
Haim Yulzari28-Sep-05 22:24
Haim Yulzari28-Sep-05 22:24 
AnswerRe: Where should I store my connection string? Pin
Anonymous29-Sep-05 7:41
Anonymous29-Sep-05 7:41 
AnswerRe: Where should I store my connection string? Pin
Luis Alonso Ramos29-Sep-05 17:13
Luis Alonso Ramos29-Sep-05 17:13 
AnswerRe: Where should I store my connection string? Pin
-Dr_X-2-Oct-05 14:42
-Dr_X-2-Oct-05 14:42 
QuestionRetrieve &amp; update data against remote database Pin
nmhuy28-Sep-05 8:15
nmhuy28-Sep-05 8:15 
AnswerRe: Retrieve &amp; update data against remote database Pin
enjoycrack28-Sep-05 20:01
enjoycrack28-Sep-05 20:01 
GeneralRe: Retrieve &amp; update data against remote database Pin
nmhuy29-Sep-05 7:22
nmhuy29-Sep-05 7:22 
QuestionHelp in SQL Stored proc Pin
satishrg28-Sep-05 7:00
satishrg28-Sep-05 7:00 
AnswerRe: Help in SQL Stored proc Pin
enjoycrack28-Sep-05 20:08
enjoycrack28-Sep-05 20:08 
QuestionADO .net --&gt; Excel Pin
Braulio Díez27-Sep-05 23:02
sussBraulio Díez27-Sep-05 23:02 
AnswerRe: ADO .net --&gt; Excel Pin
Braulio Dez27-Sep-05 23:30
Braulio Dez27-Sep-05 23:30 
Questionget update status of each row Pin
manasrahfantom27-Sep-05 22:13
manasrahfantom27-Sep-05 22:13 
Questionautomatically Run an Sql statement Pin
achrafus27-Sep-05 9:18
achrafus27-Sep-05 9:18 
AnswerRe: automatically Run an Sql statement Pin
Colin Angus Mackay27-Sep-05 9:49
Colin Angus Mackay27-Sep-05 9:49 
AnswerRe: automatically Run an Sql statement Pin
Bigfootguy27-Sep-05 20:53
Bigfootguy27-Sep-05 20:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.