Gday,
I have a checkbox on my windows forms that I need to set based on a
value in a dataset which is populated by an odp data adapter via a web
service.
The value in the oracle database is of type char(1) with possible values 'Y'
or 'N' (there are no boolean values in oracle).
The code (c#) that I currently have that is being called from the form's
load procedure to set the checkbox is as follows:
if (dsMyDataSet.Ta bles[<table>].Rows[0][<field>]== 'Y')
chkBox.Checked = true;
else
chkBox.Checked = false;
However there are two issues that I hope you might be able to point me
in the right direction with:
1. How do you do comparisons for type char? (I get this message:
Operator
'==' cannot be applied to operands of type 'object' and 'char')
2. I am not sure how to reference the current row in the dataset
If this is not the right forum please point me in the right direction.
Regards,
Peter 2 2299
Peter,
I had a similar problem in VB .Net. Solution was to convert to string.
Depending on what I was working with I either used CSTR() or
expression.ToSt ring
As for current row in a dataset, haven't seen any easy method. When I go to
a form, it's usually from a datagrid and I use CurrentRowIndex . Or if
sorted, find the record I want.
"mrstrong" wrote: Gday,
I have a checkbox on my windows forms that I need to set based on a value in a dataset which is populated by an odp data adapter via a web service. The value in the oracle database is of type char(1) with possible values 'Y' or 'N' (there are no boolean values in oracle).
The code (c#) that I currently have that is being called from the form's load procedure to set the checkbox is as follows:
if (dsMyDataSet.Ta bles[<table>].Rows[0][<field>]== 'Y')
chkBox.Checked = true;
else
chkBox.Checked = false;
However there are two issues that I hope you might be able to point me in the right direction with:
1. How do you do comparisons for type char? (I get this message: Operator '==' cannot be applied to operands of type 'object' and 'char')
2. I am not sure how to reference the current row in the dataset
If this is not the right forum please point me in the right direction.
Regards,
Peter
"mrstrong" <mr******@hotma il.com> wrote in message
news:43******** @news.eftel.com ... Gday,
I have a checkbox on my windows forms that I need to set based on a value in a dataset which is populated by an odp data adapter via a web service. The value in the oracle database is of type char(1) with possible values 'Y' or 'N' (there are no boolean values in oracle).
The code (c#) that I currently have that is being called from the form's load procedure to set the checkbox is as follows:
if (dsMyDataSet.Ta bles[<table>].Rows[0][<field>]== 'Y')
should be: =="Y"
oracle pl/sql -> c# caused my confusion.
Thanks,
Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Phil Powell |
last post by:
I am producing a form using PHP on the back end and Javascript on the
front end. The resulting script will come to the browser as follows:
<script>
<!--
function selectAll() {
moveElement = eval("document.imageForm.move" + "");
alert(moveElement);
if (document.imageForm.select_all.checked) {
|
by: Bill |
last post by:
I have a catalog of books which need to be categorized into different
groups. Some of the books can be listed under more than one category.
I'm creating a page where I can assign a group of books to a category
by checking the checkbox next to their name (say I've looped out 100
of them, and check some, and not others) then submitting the form for
processing, so that those titles where the checkbox is checked will
get the categoryid number...
|
by: susmita_ganguly |
last post by:
Hi
I am trying to upgrade from oracle 8i to oracle 9i on the same server
..I don't know much abt migration .
Can anyone help me out.
Thanks.
Susmita
|
by: db2sysc |
last post by:
1. In the oracle trigger we have a SINGLE INSERT STORED PROCEDURE
CALLED MUTLIPLE TIMES with different values.
But when changed to DB2, it gives SQL -746 ?? Any help??
2. In oracle we have
Create or replace TYPE TEST_TYPE AS OBJECT ( ....,....)
|
by: mrstrong |
last post by:
Gday,
I have a checkbox on my windows forms that I need to set based on a
value in a dataset which is populated by an odp data adapter via a web
service.
The value in the oracle database is of type char(1) with possible values 'Y'
or 'N' (there are no boolean values in oracle).
The code (c#) that I currently have that is being called from the form's
load procedure to set the checkbox is as follows:
| |
by: clinttoris |
last post by:
Hello Experts,
I have been told to post this in the Javascript forum as I want to do
this client side just before my form gets submitted. Once the user
clicks the submit button a javascript function needs to run and
validate all the checkboxes on my form and make sure none of them are
unchecked. I suck at Javascript and my problem is 2fold. I have the
following code that constructs the checkbox
response.write "<input type=checkbox...
|
by: wenmang |
last post by:
Hi,
I am using following Oracle Proc-C compiler:
Pro*C/C++: Release 8.1.7.0.0 - Production on Thu Jun 15 15:57:32 2006
(c) Copyright 2000 Oracle Corporation. All rights reserved.
I like to use "long long" integer type(64 bit), but it seems that
Oracle doesn't like it after execution, and giving me error code -1460,
any idea about this?
thx
|
by: vikas000000a |
last post by:
Hi All,
I am new to this forum as far as posting a question is concerned, although I have quite frequently visiting this site as a guest.
My quertion relates to preforming fast searched in a very large oracle database. This is my company database. I am having two very huge tables containing crores of records. I have to match each record from one table (I'll call it base table from here onwards) to another table which may contain one or more...
|
by: anuptosh |
last post by:
Hi,
I have been trying to run the below example to get a Oracle Array as an output from a Java code. This is an example I have found on the web. But, the expected result is that the code should return me Array element type code 1, but it is returning me type code 12 and the array in a junk or unreadable format . Our environment is JDK 1.4, ojdbc14.jar and Oracle 8i
Not able to find out what they problem is and am not able to change the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |