[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

01/28/2008 at 05:53AM PST, ID: 23116170
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.4

Datagridview comboboxcolumn Oracle datasource problem

Asked by graham_ball in .NET, PL / SQL, C# Programming Language

Tags: c#

I have a cobobox column in a datagridview that works fine with the attached code; it displays the correct text for the value it retrieves from the database.
However, If I make a minor alteration to the code to handle null values, it doesn't work. I get the
{"DataGridViewComboBoxCell value is not valid."} error.

When I handle the error and cancle straight out of it, the key value is displayed in the combobox, which is a valid value, as it worked fine previously.

I've tried handling the null value as follows, but again, I just get the value (1009107) displayed in the combobox, not it's equivalent text.
In both cases, clicking on the combobox removes the key value and displays the dropdown list as expected.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
string SQL
	= "select tr.recommendation_id  "
	+ ", substr(tco.COMMON_DESCRIPTION,instr(tco.COMMON_DESCRIPTION,' ') +1) Result  "
// This works fine
	+ ", tr.FIRST_TIME_ACCEPTANCE_CODE_ID RFT_CODE_ID "
// This doesn't
	+ ", nvl(tr.FIRST_TIME_ACCEPTANCE_CODE_ID, 1009107) RFT_CODE_ID "
// Neither does this
	+ ", decode(tr.FIRST_TIME_ACCEPTANCE_CODE_ID, null, 1009107, tr.FIRST_TIME_ACCEPTANCE_CODE_ID) RFT_CODE_ID "
	+ "from t_recommendations tr  "
	+ "	, t_products tp  "
	+ "    , exii.t_codes tc "
	+ "    , t_common tco  "
	+ "    , t_providers tpr "
	+ "where tr.PRODUCT_ID = tp.PRODUCT_ID  "
	+ "and tr.PREMIUM_FREQUENCY_CODE_ID = tc.code_id  "
	+ "and tr.factfind_id = '" + factfindID + "' "
	+ "and tr.letter_id = '" + letterID + "' "
	+ "and tr.ACCEPTED_CODE_ID = tco.COMMON_ID "
	+ "and tr.PROVIDER_ID = tpr.PROVIDER_ID(+)  "
	+ "order by 1 "
	;
OracleDataAdapter da = new OracleDataAdapter(SQL, Connection);
DataTable dtRFT = new DataTable();
da.Fill(dtRFT);
dgvRFT.DataSource = dtRFT;
[+][-]01/28/08 06:13 AM, ID: 20758998

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 06:20 AM, ID: 20759066

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 06:21 AM, ID: 20759073

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 06:35 AM, ID: 20759207

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 06:41 AM, ID: 20759272

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 06:45 AM, ID: 20759309

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 06:51 AM, ID: 20759364

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 06:58 AM, ID: 20759429

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 07:39 AM, ID: 20759885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 07:42 AM, ID: 20759939

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 08:13 AM, ID: 20760306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/08 08:22 AM, ID: 20760419

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/28/08 10:57 AM, ID: 20761797

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/29/08 01:11 AM, ID: 20766317

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/29/08 06:02 AM, ID: 20767774

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/29/08 06:27 AM, ID: 20767970

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, PL / SQL, C# Programming Language
Tags: c#
Sign Up Now!
Solution Provided By: graham_ball
Participating Experts: 3
Solution Grade: B
 
 
[+][-]02/03/08 09:25 PM, ID: 20812128

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 / EE_QW_2_20070628