Hello All
I have a typed dataset called PropertyDS, with 2 colums named -
fld_propertyname and fld_propertyvalue. From my web app, I store
values in these columns with a Add_row function. So, it should hold
values like "txtAdditionalCourseInfo" in the column fld_propertyname
and "Mfg 101" in the column fld_propertyvalue.
Later on, I need to retrieve values by sending the fld_propertyname
(txtAdditionalCourseInfo) and correspondingly get its value "Mfg 101".
How do I do that? I vaguely rememeber about doing it in combination of
key and value, but do not remember the syntax for it. Would appreciate
your help.
//code where the rows are added
public void AddHeaderPropertyRow(string propertyName, string
propertyValue)
{
PropertyDataSet.Tbl_PropertyRow dr =
this.PropertyDS.Tbl_Property.NewTbl_PropertyRow();
dr.fld_PropertyName = propertyName;
dr.fld_PropertyValue = propertyValue;
this.PropertyDS.Tbl_Property.AddTbl_PropertyRow(dr );
}
//Code where the GetPropertyValue function is called
private void LoadPropertyValuesToCourseDS()
{
LyoTrainingCourseDataSet.Tbl_CourseRequestHeaderIn foRow drCourseHeader
=
CourseDS.Tbl_CourseRequestHeaderInfo.NewTbl_Course RequestHeaderInfoRow();
drCourseHeader.fld_AdditionalCourseInfo =
this.GetPropertyValue("txtAdditionalCourseInfo");
}
//code where I need to retreive the value sending the properyname
public string GetPropertyValue(string propertyName)
{
//this.PropertyDS.Tbl_Property.fld_PropertyNameColum n.
{propertyName}.v.ColumnName
return "the propertyvalue";
} 1 1109
this.PropertyDS.Tbl_Property.Select ( "fld_propertyname= '" + someVariable +
"'";
notice single quotes.
if its an int then
this.PropertyDS.Tbl_Property.Select ( "Age = " + someVariable.ToString()) ;
"Sue" <iy*********@hotmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hello All
I have a typed dataset called PropertyDS, with 2 colums named -
fld_propertyname and fld_propertyvalue. From my web app, I store
values in these columns with a Add_row function. So, it should hold
values like "txtAdditionalCourseInfo" in the column fld_propertyname
and "Mfg 101" in the column fld_propertyvalue.
Later on, I need to retrieve values by sending the fld_propertyname
(txtAdditionalCourseInfo) and correspondingly get its value "Mfg 101".
How do I do that? I vaguely rememeber about doing it in combination of
key and value, but do not remember the syntax for it. Would appreciate
your help.
//code where the rows are added
public void AddHeaderPropertyRow(string propertyName, string
propertyValue)
{
PropertyDataSet.Tbl_PropertyRow dr =
this.PropertyDS.Tbl_Property.NewTbl_PropertyRow();
dr.fld_PropertyName = propertyName;
dr.fld_PropertyValue = propertyValue;
this.PropertyDS.Tbl_Property.AddTbl_PropertyRow(dr );
}
//Code where the GetPropertyValue function is called
private void LoadPropertyValuesToCourseDS()
{
LyoTrainingCourseDataSet.Tbl_CourseRequestHeaderIn foRow drCourseHeader
=
CourseDS.Tbl_CourseRequestHeaderInfo.NewTbl_Course RequestHeaderInfoRow();
drCourseHeader.fld_AdditionalCourseInfo =
this.GetPropertyValue("txtAdditionalCourseInfo");
}
//code where I need to retreive the value sending the properyname
public string GetPropertyValue(string propertyName)
{
//this.PropertyDS.Tbl_Property.fld_PropertyNameColum n.
{propertyName}.v.ColumnName
return "the propertyvalue";
} This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeremy Chapman |
last post by:
Populating a typed dataset from xml document:
I created an xml schema (attached below), generated a typed dataset from it,
and then programatically I tried to populate the typed dataset by...
|
by: samadams_2006 |
last post by:
Hello,
How do I retrieve SQL Data into an XML Document? I have the following
code, which will retrieve SQL data and write it to the screen via the
Response Object, but I'd like to be able to...
|
by: Nemisis |
last post by:
Hi everyone, sorry if this post gets really long, i just wanna make
sure i fully explain what i am trying to do. I am new to OOP and .net
2.0, so if this is obvious, i am sorry.
I have wrote a...
|
by: Randy Smith |
last post by:
Hi ALL,
I wonder if anyone has been using n-tier to bind to a GridView control by
using the ObjectDataSource. This is our first OOP web application, and we
have no tables. Right now we are...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |