|
Thanks for your suggest very much.
Now I can run my app in win98.
H.Dung
|
|
|
|
|
Hi,
I write an application in C# but I don't want user run it more one instance. How do I know numeric of instance of this app when user fire it? And how to I resolve this problem?
Please help me.
Thanks.
H.Dung
|
|
|
|
|
|
Hi,
Thanks you very much.
H.Dung
|
|
|
|
|
Hello, I'm making HTTP requests with System.Net.HTTPWebRequest and I want to capture the entire header of the request as a string. I'm able to do this with responses but now the requests. Am I missing it in the API somewhere or is there another way?
thank you
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Hi,
I'm creating a COM+ Client/Server in C# and so far things are going relatively well. The client talks to the server, the server puts the data sent to it into the database, it then sends a successful message back to the client. It all runs under the Component Services until start looking at calling the server from a remote machine. If I move the client to a remote machine I get a wonderful 'System.IO.FileNotFoundException' error referring to the server DLL. Surely I don't need to distribute the DLL along with the Client EXE file? Do I?
All I want to do is have a COM+ service running on a server and my client to connect to it! Could some one help me figure out what I missed?
Thanks in advance.
Graham
|
|
|
|
|
SpudgunDoogal wrote:
All I want to do is have a COM+ service running on a server and my client to connect to it! Could some one help me figure out what I missed?
I know that it is an obvious question, but have you exported a COM+ application proxy to the client computer?
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I completely forgot to do that bit! It's been a while since I last did any COM! When I try to export the application proxy I get the error:
"Error Code 8002801D - Library not registered"
All the registry entries are there and appear fine. I'm running the component under Windows 2000 with service pack 3. Any ideas?
Thanks
Graham
|
|
|
|
|
Using RegMon I discovered that there seems to be some registry keys missing. The COM+ exporter is looking for the CLSID value in HKLM\SOFTWARE\Classes\NameSpace.Class\CLSID. Which doesn't exist for this component.
Why would that be the case? I've added it to the GAC and used regsvcs to register it with Component Services. Have I missed another step?
Thanks again for all your help.
Graham
|
|
|
|
|
SpudgunDoogal wrote:
Why would that be the case? I've added it to the GAC and used regsvcs to register it with Component Services. Have I missed another step?
Try generating a Type Library with regsvcs /tlb and registering this tlb by hand, see if it helps.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I'm writing a small application that needs to take a DataSet and dump it to either a Comma Delimited text file or a Tab delimited text file. I was wondering if there are any "proper" ways to do this, using built in functions or classes, or if I should just manually write out the proper format to a standard text file. Writing it out myself is trivial, but if theres an established way of doing this with .NET I would like to know.
Thanks
Dave Ratti
|
|
|
|
|
Nope, just a "proper" way to write it out to XML.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
|
|
By now you have probably already solved this problem, but just incase you havent I recently put the following code together to read a file as a dataset and vice versa :
public static DataSet ReadFileAsDataSet(string filePath, string fileName)
{
OleDbConnection oCon = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filePath + ";" +
"Extended Properties=\"text;HDR=NO;FMT=Delimited\"");
OleDbDataAdapter oCmd = new OleDbDataAdapter(
"select * from "+fileName, oCon);
DataSet ds = new DataSet();
oCmd.Fill(ds);
oCon.Close();
return ds;
}
public static void WriteDataSetAsFile(string filepath, string fileName, DataSet ds)
{
if(File.Exists(filepath + "\\" + fileName))
File.Delete(filepath + "\\" + fileName);
StreamWriter sw = new StreamWriter(filepath + "\\" + fileName, true);
foreach (DataRow dr in ds.Tables[0].Rows)
{
object[] objRowData = dr.ItemArray;
string strRowData = string.Empty;
foreach(object obj in objRowData)
{
strRowData+= "\"" + obj.ToString() + "\",";
}
strRowData = strRowData.Remove(strRowData.Length - 1, 1);
sw.WriteLine(strRowData);
}
sw.Close();
}
|
|
|
|
|
|
i am looking for a grid control where i can display and edit data..there are no backend tables involved..
isnt the data grid control usable only if you bind it to a backend ?
There are no failures; there are only extended learning opportunities.
|
|
|
|
|
The datagrid can be used with many things like a dataset, an xml document, etc. Or you can just load it up yourself.
|
|
|
|
|
ok thanks..will try and let you know..
i had taken a cursory look at the datagrid's members and somehow had the notion that the bind was mandatory..
There are no failures; there are only extended learning opportunities.
|
|
|
|
|
I need to Export Fields in a table into another Database Table on a Remote machine, at the moment I Export the records one by one and delete the records as I go along. This is very slow over a 28k connection that I need to use.(3 records per second or so, I am dealing with 1000s of records)
I would love to take all the records at once, dump the on the remote machine and then delete the lot!
I can make use of a Dataset to get all the records but how do I specify what and how to export this to another connection???
Leon v Wyk
|
|
|
|
|
Well, a DataSet can be written to an implementation-independent XML file using DataSet.WriteXml() . Since DataSet is also marked with SerializableAttribute and implements ISerializable , you can serialize this normally to a file yourself. It also derives from MarshalByValueComponent , which means that you can use it in remoting as a remote, pass-by-value object. See the documentation for DataSet for what else is available.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Doing them in a set wont speed anything up more for you. Best is to perhaps export the table to a temporary access database, zip the file , send it to other side, etc ,etc. Access tends to compress very well.
Leon v Wyk wrote:
at the moment I Export the records one by one and delete the records as I go along. This is very slow...I am dealing with 1000s of records
I can picture that
leppie::AllocCPArticle(Generic DFA State Machine for .NET);
|
|
|
|
|
Hi, I want to add a new row to a datatable, which I have done. It works perfectly. I then did the dataTable1.AcceptChanges() in the belief that it would save my changes to the database. It did not do this, does anyone have any ideas how to do this?
|
|
|
|
|
Did you add the row back to the rows collection and call Update on the dataAdapter? The code should look like this:
DataRow row = dataTable.NewRow();
row["Column1"] = "blah";
row["Column2"] = "blech";
dataTable.Rows.Add( row );
dataAdapter.Update( dataSet, "TableName" );
dataSet.AcceptChanges();
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
ok the application config xml file is great for applications but what if I create a namespace / class that will be compiled as a dll and used in other application, where would or rather should I stick it configuration "defaults" in the host application config xml file or should it have it's own file?
Thanks
Rob
|
|
|
|