|
Hi,
I am storing description of few forms in a .DEF file(text file). The .Def file is in a particular format and each form description is stored under a particular heading say for Eg. FORM1, FORM2, FORM3. Now after a particular form is edited say FORM2, I will have to rewrite the entire block of text under the header FORM2 which is nothing but a string . What is the best way to rewrite a particular block of text ?
Thanks
Bharath
|
|
|
|
|
Afaik there is no straight way to do it, because unless the length of those blocks are always the same there would be the need to move everything coming after the exchanged block of text (which would mean to write the whole file again if you were exchanging the first block).
But unless you aren't talking about several thousand lines of text you should probably just write everything when needed. The performance overhead shouldn't be that much.
Another method would be to store your infos in several files (one for each form).
|
|
|
|
|
|
Yes. Its the description of XFS forms
Thanks
KR
|
|
|
|
|
I have created a custom action(windows application) and then added a setup and deployment project to install this.
I need to return custom errors when the msi is executed using MSIEXEC.exe.
Can anyone help me regarding this?
Regards,
Lata Agrawal
|
|
|
|
|
Hi
I have a problem using OleDbDataAdapter and DataSet in a C# windows application and MS Access 2000 database. The primary keys use AutoNumber/IDENTITY columns.
In the DataSet I load two tables from the database (a parent and a child table).
I add an event handler to the dataAdapter:
adapter.RowUpdated += new
OleDbRowUpdatedEventHandler(DataAdapter_OnRowUpdate);
private static void DataAdapter_OnRowUpdate(object sender, OleDbRowUpdatedEventArgs e)
{
OleDbCommand oCmd = new OleDbCommand("SELECT @@IDENTITY", e.Command.Connection);
e.Row["MachineIndex"] = oCmd.ExecuteScalar();
e.Row.AcceptChanges();
}
When I insert new data into the parent table in the DataSet and update the database the above-mentioned event handler returns the correct newly inserted AutoNumber column value. However when I update an existing row in the datatable in the DataSet and update the database, the value returned is 0 (zero) and then the index of that row in the DataSet shows 0.
Can anyone give me some assistance regarding this problem.
Thanks.
Kobus
|
|
|
|
|
The @@identity property is only set when a record is created, not when a record is updated.
---
b { font-weight: normal; }
|
|
|
|
|
Hi, When I scale on C# (using Matrix.Scale), the anchor point is the top left of the graphics. How can i make it so the center point of the scaling is arbitrary (for example the mouse pointer)?
|
|
|
|
|
hi all,
can someone please give me some idea of how to do remoting using custom objects?
all tutorials ive seen are passing strings or datasets, but i want to pass an object that is not inherintly serialisable. (i know i have to serialise it ... but ...)
i have also looked at serialising objects but all info ive seen are about serailising the object to file or xml, but i just want to squirt it down the wire, once i get the object at the client i serialise it there to database.
can anyone please give me a link or small example or something as its driving me crazy trying to work it out
kind regards,
g00fy
|
|
|
|
|
For serialization have a look at this article. It explains the basics very well.
Once your class is serializable remoting should work fine.
|
|
|
|
|
thank you again
i used datasets for the previous problem but i have another remoting application that will use object passing. i will look into it
kind regards,
g00fy
|
|
|
|
|
Hi
I have a filled TreeView and a I have to select a Node in this TreeView. I know the path to select it, but how can I make a selection in this TreeView?
"FullPath" is ReadOnly
Thanks a lot for help
Greets
Michael
|
|
|
|
|
Hi!
Just set the SelectedNode property.
Regards,
mav
|
|
|
|
|
Dear All,
I run a squid server on WinXP (127.0.0.1:8081).
I have a C# application that I want to it redirect ALL HTTP request to squid.
(application and squid run on one system)
I use GlobalProxySelection and below code in my application, but dont work.
Uri proxyURI = new Uri("http://127.0.0.1:8081");
GlobalProxySelection.Select = new WebProxy(proxyURI);
How can I redirect ALL http request to this proxy server?
--TNX
|
|
|
|
|
Why does Double.NaN != Double.NaN
ie, this fails
double d1 = Double.Nan;
double d2 = Double.Nan;
System.Diagnostics.Debug.Assert(d1 == d2);
|
|
|
|
|
|
Read my question.
MSDN says
Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN.
I already know that. I am asking why.
|
|
|
|
|
Is a not defined number equal to another one?
Is 2/0 equal to 3/0?
Intuitively seen (probably) yes, but mathematical: No!
Double.NaN is mathematically not existing so it isn't equal to anything (including itself).
|
|
|
|
|
Fair enough but I think of NaN as being the numerical equivilent of null and the following is true
Object o1 = null;
Object o2 = null;
o1 == o2;
|
|
|
|
|
I got your point of view but from a mathematical point of view the framework is absolutely right.
|
|
|
|
|
Hi,
I got a service. I am trying to monitor the data on that service using the perfmon tool of windows XP.
I checked the log file of that service, the data collected is 0 for all the performance counters.
I am having these performance counters: Average Response time, Number of Requests, Number of Requests per second.
Can anyone help me, how to monitor and collect the data on that service.
Thank you.
ftht
|
|
|
|
|
This is my code in C#.The database i am trying to access is having 49 entries in NotesdataTable sequentially(1 to 49).When i check ,i get the entry at first row, first column as 23 when the expected one is 1.
string s="";
int i,j;
string path=Application.StartupPath;
conn=new OleDbConnection("FILE NAME="+path+"\\itskiosk.udl");
adpt=new OleDbDataAdapter("Select * from NotesDataTable",conn);
DataSet dataset=new DataSet();
adpt.Fill(dataset,"NotesDataTable");
MessageBox.Show(dataset.Tables["NotesDataTable"].Rows[0][0].ToString());
What is the problem. If any body has any idea pl let me know.
Thank you.
world of intelegence
|
|
|
|
|
Try adding "ORDER BY [Column]" to your select statement
|
|
|
|
|
tahnks it is working properly know
|
|
|
|
|
check the table name that u have mentioned in C# code with the one u created
in Database.
I observed a mismatch between those two from ur query.
u might have done...
NotesdataTable in Database
NotesDataTable in C# code.
check it
venkat
|
|
|
|