|
[Interface]
Name = File-link A
Default section = ABC
[Fields]
Section = 1
Analyte = 2
Date = 3
Time = 4
QC material = 5
Value = 6
Flag = 7
[Format]
Delimitor = #9
Date = DD/MM/YYYY
Time = hh:mm:ss
[Sections]
[Tests]
4=Test1/QC1,QC2,QC3
[Flags]
$t=My Data
|
|
|
|
|
ABC 4 21/09/2008 09:09:09 QC1 0.10 $t
ABC 4 21/09/2008 09:09:09 QC1 1.01 $t
ABC 4 21/09/2008 09:09:09 QC1 2.02 $t
ABC 4 21/09/2008 09:09:09 QC1 3.03 $t
ABC 4 21/09/2008 09:09:09 QC1 4.04 $t
ABC 4 21/09/2008 09:09:09 QC1 5.05 $t
ABC 4 21/09/2008 09:09:09 QC1 6.06 $t
|
|
|
|
|
Thanks Deepak.
I have already reached the solution.
Thanks for ur efforts.
Regards
Dinker Batra
|
|
|
|
|
I have gotten just about everything i need for my application but i want to be able to programmatically read/write to the field description using C#.net. I have googled this but came up with nothing. please help, this will really make my app shine if i can do this.
|
|
|
|
|
djjedi wrote: read/write to the field description
what field description
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
The description for the column name. I'd like be able to access it (read/write)
|
|
|
|
|
ah, i didnt see that in the subject line!
when you select the data, u can specify the column name the user will see
like this
SELECT columnOne AS 'My First Column', columnTwo AS 'My Second Column'
FROM myTable
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I guess maybe im missing something.
im able to retrieve the tables using
private void GetTables()
{
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DataBaseFile;
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(connectionString);
try
{
this.cboSections.Items.Clear();
conn.Open();
DataTable schemaTab =conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, new Object[] {null, null, null, "TABLE"});
DataTable schemaTable =conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, new Object[] {null, null, null, "TABLE"});
conn.Close();
for (int j = 0;j < schemaTable.Columns.Count; j++)
{
Console.WriteLine(schemaTable.Columns[j].ToString());
for (int i = 0; i < schemaTab.Rows.Count; i++)
{this.cboSections.Items.Add((schemaTab.Rows[i].ItemArray[2].ToString()));}
if (this.cboSections.Text.Equals(""))
this.cboSections.SelectedItem = this.cboSections.Items[0];
}
}
catch(Exception ex){Console.WriteLine(ex.Source);}
}
and im able to retrieve tthe columns im looking for using
private void GetColumns()
{
string TableName = this.cboSections.SelectedItem.ToString();
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DataBaseFile ;
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(connectionString);
DataRowView drvCols = null;
DataTable dtCols = null;
DataView dvColumns = null;
// Get the list of tables that there are.
try
{
this.liFields.Items.Clear();
this.liValues.Items.Clear();
conn.Open();
DataTable schemaTab =
conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, new Object[] {null, null, null, "TABLE"});
for (int i = 0; i < schemaTab.Rows.Count; i++)
{
if (this.cboSections.Text.Equals(schemaTab.Rows[i].ItemArray[2]))
{
// Get the column name and its type and sort them
// according to their position in the table.
dtCols = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns,new Object[]{null,null, schemaTab.Rows[i].ItemArray[2].ToString(), null});
dvColumns = new DataView(dtCols);
dvColumns.Sort = "ORDINAL_POSITION";
// Get the column names and their types.
for (int j=0; j< dvColumns.Count; j++)
{
// Get the name of the column.
drvCols = dvColumns[j];
if ((! drvCols.Row.ItemArray[3].ToString().Equals("ID") )&& (! drvCols.Row.ItemArray[3].ToString().Equals("")))
{
this.liFields.Items.Add(drvCols.Row.ItemArray[3].ToString());
this.liValues.Items.Add(ini.IniReadValue(cboSections.Text,drvCols.Row.ItemArray[3].ToString()));
}
}
}
}
}
catch(Exception ex){Console.WriteLine(ex.Source);}
conn.Close();
}
but im unable to get the descriptions for those columns.
|
|
|
|
|
Hi all..
I am trying to write to a xml file...
The problem i am facing is....I am writing in a for loop..
Each time it is replacing with the old one..
I am trying with the code..
for (int indx = 0; indx < contact.Fields.Count; indx++)
{
StreamWriter sw = new StreamWriter(@"D:\Temp\File.xml");
sw.WriteLine(contact.Xml);
sw.Flush();
sw.Close();
}
what i wanted is change the file name with File1.xml,File2.xml,....etc
can anyone help..
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Depends on whether you want to overwrite the files written from an older for loop. If this is the case, then you can just write the filename as
@"D:\Temp\File.xml"+i
If you don't want to overwrite files at all, then you'd first have to examine all filenames in the directory (via Directory.GetFiles() ) and get the highest file id ever assigned, and start the counter from there.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
@"D:\Temp\File" + i + ".xml" is probably more useful.
|
|
|
|
|
Use a GUID for a filename - they're guaranteed to be unique, and therefore aren't susceptible to stopping/restarting the program.
for (int indx = 0; indx < contact.Fields.Count; indx++)
{
string guid = Guid.NewGuid().ToString().Replace("-","").Replace("{","").Replace("}","");
StreamWriter sw = new StreamWriter(string.Format("D:\\Temp\\{0}.xml", guid));
sw.WriteLine(contact.Xml);
sw.Flush();
sw.Close();
}
If you don't want to delete the hyphens or curly braces, remove the Replace() method calls.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
Is there a (relatively simple) way to know whether the compiler has inlined my method? (Actually I want to make sure that it did...)
|
|
|
|
|
No, and you will have no guarantee that a function will be inlined. Actually, it's not job of the C# compiler, but rather the JIT that does the inlining at runtime, if it decides to do so. But you have no control over it and can not rely on a function being inlined.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote: But you have no control over it and can not rely on a function being inlined.
Well, there is one sure fire way, but that involves getting hired by Microsoft in a position on the CLR team and writing code to do this.
|
|
|
|
|
Pete O'Hanlon wrote:
Well, there is one sure fire way, but that involves getting hired by Microsoft in a position on the CLR team and writing code to do this.
The first thing I'd do with this new job would be to introduce some kind of forceinline directive
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote: introduce some kind of forceinline directive
That would be nice.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Well, thanks a lot. But since, I'm very concerned about performance, I'd appreciate more of your expertise. There are some methods that I'm writing just for modularity reasons. Each is just a single line of code. For example:
class X {
public int Value { get { return getExternalValue(); } }
private int getExternalValue() {
}
} I am thinking that the JIT should be intelligent enough to actually inline both methods. But is this assumption true? Or should I inline the method myself?
Many thanks to all helpful guys here in CP!
I really appreciate your help.
Know me better
|
|
|
|
|
hosamaly wrote: I am thinking that the JIT should be intelligent enough to actually inline both methods. But is this assumption true?
Nobody (apart from the Microsoft CLR team) knows exactly under which circumstances the JIT optimizes code. While the JIT probably is intelligent enough to see that the function can be inlined, it still might decide not to do so based on other parameters.
So in your case, if you're really concerned about performance you probably should inline it yourself - it'll always be a compromise between modularity/readability and performance.
This article[^] and this blog entry[^] talk a bit about the JIT method inlining, you may want to take a look at them.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You are micro-optimising. In any normal situation it will not make any real difference if the method is inlined or not.
If you really need that litte extra performance, you should probably not only inline this method, but the method that you are calling also...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You're right. I'm just trying to write micro-optimized code that is maintainable to some level. I'm introducing a wrapper layer for some external functions, but performance is at premium, so I'm trying to optimize it as much as possible, without exposing the external interfaces to other layers.
Many thanks to all helpful guys here in CP!
I really appreciate your help.
Know me better
|
|
|
|
|
If you really need to optimise the code so much that you need the methods to be inlined, you are way beyond maintainable code. If you are still thinking of maintainable code, you should not bother with the tiny performance difference that inlining methods means.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello everyone,
I am reading WSDL and SOAP spec and my purpose is to learn Spec/protocol details, for example, the component model of WSDL/SOAP and meaning/relationship between sections of messages/XML.
Now I am learning from Spec, but find it so boring to learn and not very readable.
http://www.w3.org/TR/wsdl20/
http://www.w3.org/TR/2007/REC-soap12-part0-20070427/
My question is whether there is more readable documents or turorials? Or learning web sites?
thanks in advance,
George
|
|
|
|
|
Has any one has done this , who is online of the user who has given his valid credentials.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: Has any one has done this
i dont think you can, not unless you work for Google and have access to their systems...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|