Re: [OT] My First C# (warning - long post)
- From: LX-i <lxi0007@xxxxxxxxxxxx>
- Date: Thu, 01 Feb 2007 19:42:09 -0600
Pete Dashwood wrote:
"LX-i" <lxi0007@xxxxxxxxxxxx> wrote in message news:19a17$45c1fe8b$454920f8$23261@xxxxxxxxxxxxxxI thought that's what they were... Isn't that how you define properties? "public [type] [name]"?
No. Those are global variables. Click on Help in VS2005 and then click "index". Enter "properties"... Or start with this direct local link:
I found that. (BTW, that's just another plus of the IDE - the F1 help is really helpful!)
The "set" method inserts a Pic x(5) return code into the start of an interface block, defined as a COBOL structure of 8192 bytes (this is for compatibility with COM BSTRING type.)Why did you use char.Parse("0") instead of just '0'?
Because '0' wouldn't work...? :-)
Must be that managed vs. unmanaged stuff... I can assign '0' to a char variable. I believe you - I wonder what the difference is?
Excellent! It will take a little time. It is a journey of many small steps... Each method you write will be "better" than the last one.
OK - here's what I've got for one of the methods. I'm not sure that this looks right...
protected DataSet itemInfo = new DataSet();
....
// Establish the element for this class instance
public void retrieveElementInfo(String reiElementId)
{
// Retrieve the information about the passed program
String sql = "SELECT * "
+ "FROM active_elements "
+ "WHERE element_id = '" + reiElementId.Trim() + "'";
SqlDataAdapter da = new SqlDataAdapter(sql, dbConn);
da.Fill(itemInfo);
if (itemInfo.Tables.Count > 0)
{
elementType = itemInfo.Tables[0].Rows[0]["element_type"].ToString().ToCharArray()[0];
elementSubType = itemInfo.Tables[0].Rows[0]["element_subtype"].ToString().Trim();
fileName = itemInfo.Tables[0].Rows[0]["server_name"].ToString().Trim();
elementId = reiElementId.Trim();
}
}
(We have to trim the stuff coming out of the database because it's defined as char instead of varchar...)
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ daniel@thebelowdomain ~
~ _____ / \ | ~ http://www.djs-consulting.com ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Who is more irrational? A man who believes in a God he doesn't see, or a man who's offended by a God he doesn't believe in?" - Brad Stine
.
- Follow-Ups:
- Re: My First C# (warning - long post)
- From: andrewmcdonagh
- Re: My First C# (warning - long post)
- References:
- Re: [OT] My First C# (warning - long post)
- From: LX-i
- Re: [OT] My First C# (warning - long post)
- From: Pete Dashwood
- Re: [OT] My First C# (warning - long post)
- From: LX-i
- Re: [OT] My First C# (warning - long post)
- From: Pete Dashwood
- Re: [OT] My First C# (warning - long post)
- Prev by Date: Re: IBM Mainframe - Batch Job to Generate Data Set List?
- Next by Date: Re: My First C# (warning - long post)
- Previous by thread: Re: [OT] My First C# (warning - long post)
- Next by thread: Re: My First C# (warning - long post)
- Index(es):