|
no i have to jst look at keys in new ini and change respective values in old ini.I dnt want to replace.
|
|
|
|
|
reason for not using replace method is i have to skip some specific keys and change others.
|
|
|
|
|
|
You can use "Notepad++", it has compare feature in it's Plugins menu.
From here you can compare two file which are text based..(i.e. .txt, .doc, etc and also .ini)
You can download it from following link, it's totally free
http://notepad-plus.sourceforge.net/uk/download.php[^]
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
i have to do it programatically.
|
|
|
|
|
Then you can load both files in string using streamreader
and then you can compare by using equal function of it.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Comparing two text files can be tricky business and may need some complex algorithms.
If you just have a few keys in your file, then it might just be faster for you to load both files in a dictionary and then compare the values.
|
|
|
|
|
I am Using Smo to Generate Insertion Script of the database.
How can I check whether a field is Identity or not Using SMO?
|
|
|
|
|
|
Hi,
I have created 2 ListBoxes. ListBox1 gets its values from a dataset. I need to enable the user to select an item in listbox1 and then move it to listbox2. The problem I am having is the following:
When I select an item in listbox1 and click the button to move that item to listbox2, I get System.Data.DataRowView. How can I display the SelectedItem in ListBox2 instead of System.Data.DataRowView?
Thanks!
Illegal Operation
|
|
|
|
|
Listbox2.Items.Add(Listbox1.SelectedItem.Text)
|
|
|
|
|
|
I would say to use image. Retrieving and displaying can be done like this[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
How about viewing and printing it ? u know of any articles that tackle that problem ?
thnx
|
|
|
|
|
You have everything need. Just because it doesn't have the specific phrase or keyword you are looking for doesn't mean the answer isn't there. At some point in your career you will be asked to figure something out on your own.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Do not remove your messages when done, it is against the forum guidelines.
|
|
|
|
|
Hello,
I'm developing an IDE, in which I need my users to write Xml files. Since I'm providing code completion, I need to know what elements and attributes are available to my users depending on what element they are in, based on an Xsd schema.
Currently I am trying to do this with a schema file, an xml file and a XmlReader. The way I was going to do it was to make the XmlReader generate a tree of available elements/attributes based on the given schema file. However, so far my debugging results show me that none of the, IMO, logical properties have the current node's name, child attributes and child elements. Here's my C# code:
using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;
namespace Moonlite.Controls.Xsd {
public static class XsdReader {
public static XsdNodeCollection Read(Stream stream, Stream schema) {
XsdNodeCollection nodes = new XsdNodeCollection();
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
XmlSchemaSet schemas = new XmlSchemaSet();
settings.Schemas = schemas;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
schemas.Add(null, XmlReader.Create(schema));
XmlReader reader = XmlReader.Create(stream, settings);
try {
while (reader.Read()) {
string currentNode = reader.Value;
}
}
finally {
reader.Close();
stream.Close();
schema.Close();
}
return nodes;
}
public static XsdNodeCollection Read(string filename, Stream schema) {
return Read(File.Open(filename, FileMode.Open), schema);
}
}
}
reader.Value has so far only returned values such as the generic Xml header ("<? xml... ?>"), "" and "\n".
Please bear with me, as this is the first time I am working with data validation.
Thanks,
Theo
|
|
|
|
|
Hello All.
I have a question about database.
I had used a oledb data adaptor and oledb commadn builder for update a row in a table.
I recieved this error:
"Dynamic SQL generation for the UpdateCommand is not supported by a SelectCommand that does not return any key column information"
Who knows the reason of this error?
I am in horry. Please Answer me.
Thanks everybody
|
|
|
|
|
Google using your error message gave this site[^] as it's top link. Along with 1919 other sites.
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
can anyone guide on what's the best way to create my own database using binary files and C#?
|
|
|
|
|
Um. Don't?
To be honest, unless you are doing something really small and trivial, the work involved is going to be ridiculous for the reward you will get. Just working out the record locking if it is to be multi-user will be pretty horrible. Then there is the space allocation, the different variable storage requirements, and so forth.
If you just need to store single user values, then go with XML or SOAP.
If you need to store multi-user data, or delete / insert records, then use SQLExpress or MySQL - both are free and will be a lot less hassle to get working and debugged.
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
Don't try. If you just need to store something, just do it but don't call it a database. If you need a database, use a database, if you make one yourself it will just have a ton of bugs..
And "binary file" is a pleonasm. All files are binary. Just, some binary files are also something else (a text file is also a binary file, etc). I'm sure you know that, but it looked suspicious.
If the point is just trying to make a database just for the heck of it, that's nice, I'd start by reading the relevant articles on wikipedia
|
|
|
|
|
hi,
i've made a relational DBMS (database management system) for smart devices for my college diploma, based on binary files and XML.
In the XML it describes the structure of the database then the data will be written in binary files, and the search is based on indexing each column (the indexing algorithm is based on hashtables).
I've worked very hard and for long time to acomplish what is allready done with succes and no headaches by Microsoft or Sun.
Conclusion: The job is a little too much for 1 programmer and not worth the effort.. i was very stubborn to do this.
See this: [DBMS Wiki] and [RDBMS].
|
|
|
|
|
Hi everybody,
I am trying a smart device application.
the problem is after i execute a querry that should insert a new line in a table, i go to check if the line existe really in the table then i don't find it.
this is the code i used.
Thank you for your help in advance.
private void menuItem4_Click(object sender, EventArgs e)
{
string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
SqlCeCommand command2 = sqlceconn.CreateCommand();
command2.CommandText = "INSERT INTO compteurs2 ([com], [quantite],[datequantite] ) Values(@com,@qtte,SYSDATE)";
command2.ExecuteNonQuery();
SqlCeParameter com = new SqlCeParameter("@com", SqlDbType.NVarChar);
com.Value = comComboBox.SelectedItem.ToString();
command2.Parameters.Add(com);
SqlCeParameter qtte = new SqlCeParameter("@qtte", SqlDbType.Float);
qtte.Value = float.Parse(textBox1.Text);
command2.Parameters.Add(qtte);
}
|
|
|
|
|
I think you should execute the command afther you add the parameters to it, or else the insert will fail (as it has so far) havning nothing to insert.
Something like this:
private void menuItem4_Click(object sender, EventArgs e) {
string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
SqlCeCommand command2 = sqlceconn.CreateCommand();
command2.CommandText = "INSERT INTO compteurs2 ([com], [quantite],[datequantite] ) Values(@com,@qtte,SYSDATE)";
SqlCeParameter com = new SqlCeParameter("@com", SqlDbType.NVarChar);
com.Value = comComboBox.SelectedItem.ToString();
command2.Parameters.Add(com);
SqlCeParameter qtte = new SqlCeParameter("@qtte", SqlDbType.Float);
qtte.Value = float.Parse(textBox1.Text);
command2.Parameters.Add(qtte);
command2.ExecuteNonQuery();
}
Oh and, I an not 100% sure, but I think that SYSDATE is not supported in SQL CE, the one that should work is GETDATE() .
I have no smart signature yet...
|
|
|
|