|
Yustme wrote: Im like 4 hours on msdn libraries and google. But i havent found what i was looking for.
Then you should definitely train using the docs.
Since we have marvelous weather today in germany and I'm in a really good mood, here the code that should do what you want. Read the link I provided before and the docs of the involved classes to learn more.
XmlDocument doc = new XmlDocument();
doc.Load("file.xml");
public void WritingToXMLDoc(string elementString, string writeToXMLDoc)
{
XmlElement element = doc.CreateElement(elementString);
XmlText text = doc.CreateTextNode(writeToXMLDoc);
element.AppendChild(text);
doc.DocumentElement.AppendChild(element);
}
doc.Save("file.xml");
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
Am i glad that ur in a good mood.
That helped, thank you !
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
hi,
is it possible to copy an already existing database(db1.mdb)in vb2005 and show this copy on the grid, add or delete rows in it, but these chances happen in the copy for example db2.mdb. So db2.mdb doesn't exist before you run the c# program.
i would like to make different files for everyday so i can know what i changed yesterday and today
tips on this subject are always handy,
for now my program saves everyting in one file but i need to change that
plz help
thx
|
|
|
|
|
File.Copy("db1.mdb", "db2.mdb", true);
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
i see, thats how i copy one database in the other, but db2.mdb does not exitst, i need to make a new one for every day.
ill give an example how i would like to use it.
in access i make one database: db1.mdb in this i write recepst for 100 different cakes
in c# program i can see all recepst an add one or delete or i can register that i have used nr 33 and 55, all these changes are not made in the main database db1.mdb, but in a copy of it (day1.mdb) this one needs to be generated by c#.
Day 2 i open the c# program again and i get my 100 recepst form db1.mdb again, if i make changes here they will be saved in another copy of it (day2.mdb) and so on and so on.
my problem is that i dont know how to make a new database with my c# program so i become day1.mdb, day2.mdb, day3.mdb, day...
thx
|
|
|
|
|
faladrim wrote: i see, thats how i copy one database in the other, but db2.mdb does not exitst, i need to make a new one for every day
So what.? Don't hard code the destination file name but generate in a appropriate way.
string dest = "day" + DateTime.Now.DayOfYear.ToString() + ".mdb";
File.Copy("db1.mdb", dest, true);
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
and what is the defintion of file?
is that the same as my connectionstring?
|
|
|
|
|
File is a class in the System.IO namespace that exposes amongst others a static Copy method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
no prob
i forgot using system.io
thx for all the help
|
|
|
|
|
i am trying to move all of my controls in the form,when i resize form.For that in form_resize event i am just adding the difference in actual size and resized size to left of the controls. whle doing that,controls not giving the impression of just moving they are giving jumpinig like effect and like overlapping etc but once i finish resizing they are at the modified locations only,so now my problem is controls movement should not have that flickering or jumping like effect while i am resizing the form
thanx in advance.
|
|
|
|
|
Why not use the dock property?
only two letters away from being an asset
|
|
|
|
|
Hi,
In your FormResize event use
this.SuspendLayout() before the code that does the resizing and
this.ResumeLayout(true) after it.
Hope it helps.
Do your best to be the best
|
|
|
|
|
yaa i did as you said but don't know it didn't work please suggest some thing to avoid my problem
|
|
|
|
|
Can anyone tell me how I can programatically retrieve the version numbers of DLLs and Executables, other than the executing DLL or EXE, using Visual Studio 2005?
Thank you...
|
|
|
|
|
|
I have now and thank you very much.
|
|
|
|
|
I have data in a SQL Server™ 2000 database and I would like to write a Windows® Forms app to allow users to export and save the data to Microsoft® Word. How can I do this using C#?
|
|
|
|
|
Office Automation is your friend and easily reachable from C# (i.e. .NET). You can create documents, add information and save, as long as Word and all necessary libraries (including .NET) are installed on the target system.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
hello
I tryed to convert one of my matlab function into a C# Dll that I can use.
I saw in an example of Matlab that they use a dll that called mclmcrrt71.dll
but I don't know which method does mclmcrrt71 has
to add mclmcrrt71 I need to make a signture.
my questions are:
1) how can I know what function does mclmcrrt71.
2) is there any other way to make a Matlab a C# file
3) can I get an information about the IntPtr
please help
help me!!!!
|
|
|
|
|
hello all ...
in a program i show data (in db) via tableAdapter and BindingSource ....
in search part i used filter BindingSource property ,but i don't know how can impliment "like" sql command whit it?
|
|
|
|
|
Hi.
You may found the answer.But...
BindingSource1.Filter="Name Like'"+textBox1.Text+"'";
And also this
BindingSource1.Filter="Name Like'"+textBox1.Text+"%'";
CanI
|
|
|
|
|
I have a solution with two executable projects, and two libraries. One exe is private, for support only, and the other is to be deployed as ClickOnce to clients. However, when I publish this app with the wizard, it always publishes the other app as well, even if remove that app from the build. If create a third project, an exact copy of the support project, it does not publish. This indicates that the project name is persisting somewhere when it should not. Any ideas?
|
|
|
|
|
On the properties page for the project look under the Publish tab, click the Application Files button and see if the unwanted app is listed there.
only two letters away from being an asset
|
|
|
|
|
I looked, and it wasn't there, but now it's not publishing. Just one of those things.
However, now it has just arbitrarily stopped installing the Start Menu etc. items, even when the application is clearly marked for on and off line.
I'm going to go to manual publication now.
|
|
|
|