|
sorry! incredibly stupid mistake
i thought i already filled dataGrid2
thx
|
|
|
|
|
Does anyone know how to move
a row (in DataTable or DataSet or DataGrid)
I mean: for example
present fourth row as a fifth
and fifth as a fourth
doesn't work!?
DataSet ds = (DataSet)dataGrid1.DataSource;
ds.Tables[0].Rows.InsertAt(dr,i);
|
|
|
|
|
Do some free class libraries for long numbers computition exist? And where I can find one?
Jast a student!
|
|
|
|
|
Lego Bragis wrote:
Do some free class libraries for long numbers computition exist
Your question is a bit too vague to answer. What are you looking for in the way of computations? And what do you mean by 'long numbers'?
RageInTheMachine9532
|
|
|
|
|
First of all, I am sorry for my English.
I mean that i need library for working with sach big numbers, that they can be represented with no simple types (int, long, etc.).
Jast a student!
|
|
|
|
|
Have you looked into the Double type?
From the VS Docs:
The Double value type represents a double-precision 64-bit number with values ranging from negative 1.79769313486232 e 308 to positive 1.79769313486232 e 308, as well as positive or negative zero, PositiveInfinity, NegativeInfinity, and Not-a-Number (NaN).<br />
<br />
Double complies with the IEC 60559:1989 (IEEE 754) standard for binary floating-point arithmetic.
There is also a LargeNumber class here on CP at http://www.thecodeproject.com/cpp/largenumber.asp[^].
You might also want to Google for 'Large Number Class'. You'll find a project on SourceForge.net.
RageInTheMachine9532
|
|
|
|
|
'Large Number Class' is almost what I need. But actually I need .Net class. I think I found it here : http://www.codeproject.com/csharp/BigInteger.asp?print=true
Thank you. Google - RULEZZZZZ!
Jast a student!
|
|
|
|
|
Math class should be sufficient shouldnt it!
your can use 64bit ints aswell!
|
|
|
|
|
Hello. How can I use Internet Explorer DOM from C# program?
Jast a student!
|
|
|
|
|
You can add the IE COM component to your project. Go to the Toolbox and right-click in it. Select 'Add/Remove items...', then click on the 'COM' tab. Find the 'Microsoft Web Browser' (shdocvw.dll) and make sure the checkbox next to it is selected. Click OK to add the Browser component to the Toolbox. Then go back to the Tookbox and drag the component onto your form.
RageInTheMachine9532
|
|
|
|
|
What Dave said will only add the AxWebBrowser control, which is defined in the AxInterop.SHDocVw.dll assembly. Additionally, a Interop.SHDocVw.dll assembly is created that contains the delegates and interfaces needed to interface with it. If you want to actually traverse and interface with the DOM, you need to add a reference to the Microsoft.mshtml.dll assembly (probably in your GAC, but should be on your system when you install VS.NET et. al.).
Then, to get an instance of the IHTMLDocument2 interface, cast axWebBrowser1.Document to IHTMLDocument2 . In .NET, casting COM-defined interfaces is the same as QI'ing (QueryInterface ) for them like you would in COM. If you get a null reference, it means the interface is not supported.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Ahh. Thanks Heath!
RageInTheMachine9532
|
|
|
|
|
Hi there!
I wrote an application which calls several methods of a WebService. But how can i set the URL where the WebService is located AFTER compiling my application?
Thanks for reading
|
|
|
|
|
Hi flaffy,
To Call methods which are exists in the Web Service into your application.....go to your application and check the references and right click on it and select the Add Web refernces it will popup a form for the web service URL there u have to provide your web service url to get all the methods ...then click on Add button it will automatically add to ur web references.
Thanks
Ramakrishna.J
SoftProSys.ltd.
|
|
|
|
|
You can change the path to a web service using Url property inheritted from WebClientProtocol (in the web service proxy class that your client uses). To externalize this settings, you can add it to your .config's <appSettings> section and read it in with ConfigurationSettings.AppSettings["yourKeyName"] . You can also configure your proxy in VS.NET to do the same thing using the designer, but I don't remember off the top of my head how. Just explore.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks Exactly what i had looked for
|
|
|
|
|
I tried to insert data into SQL server database using the following code. All data that I received from all my connections (10 socket). It runs for sometime and I was able to insert some data then suddenly in the middle of the process I encountered
System.InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first.
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean executing)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ossrop.Class1.SaveToSQLDB(String strFile, String strOpt) in d:\ossrop\class1.cs:line 560
I declare my DBConnect as modular and with CONNECTION POOLING.
//DBConnect = new SqlConnection("Pooling=true;server=OSSSQL01;database=nfmse;uid=alarmadmin;pwd=alarmadm1n;Min Pool Size=3;Max Pool Size=100;");
DBConnect.Open();
Processdata()
{
iRx = theSockId.thisSocket.EndReceive (asyn);
char[] chars = new char[iRx]; // + 1];
System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(theSockId.dataBuffer, 0, iRx, chars, 0);
StringBuilder szData = new StringBuilder();
szData.Append(chars);
SaveTOSQL();
}
void SaveTOSQL()
{
string strInsert = "insert into rop values ('" + strjv.Trim() + "','" + strdate.Trim() + "','" + strclass.Trim() + "','" + strFile + "','" + strFile + "')" ;
DBCommand = new SqlCommand(strInsert,DBConnect);
DBCommand.ExecuteNonQuery();
}
PS : I don't close the connection nor the command becuase this is a 24 hour process.
Thanks in advance.
/dabsukol
|
|
|
|
|
One of two possibilities that I can think of.
(1) You read data with a DataReader and didn't close it when you were done reading.
(2) You are still reading data with the DataReader when you call the code to insert data on the same connection as the DataReader .
The solution for (1) is to remember to Close() DataReader s when you're done with them.
The solution for (2) is to open a new connection because you cannot run two or more commands on the same connection at the same time. (The Data Reader is still running the command because it doesn't get the data from the database until it neads it) - Since you're using Connection pooling this isn't much of an overhead.
Actually since you're using Connection pooling why not close the connection after each operation the any subsequent operations will just pull the connection back out of the pool.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Hi,
Your're correct I 'm seleceting records from the first table using ofcourse the Connection. then, while selecting ip/ports from my first table i'm also at the same time inserting data into the 2nd table with the same connection. That's why I got this error message.
Solution: all data selected from the 1st table is temporarily inserted into an array variable and from it I try to run connect and insert retrieved data into SQL using a different connection. At the same time I use a Connection Polling.
SqlConnection sqlconn = new SqlConneciotn(connstring)
open connection
Select from table1
insert into array variable
close connection
SqlConnection sqlconn = new SqlConneciotn(connstring)
open connection
insert into SQL
close connection
It work so far. Thank you very much and God Bless you.
/dabuskol
Ps : My program is running for 1 1/2 hour now with no problem registering to the log file and console.
|
|
|
|
|
dabuskol wrote:
My program is running for 1 1/2 hour now with no problem registering to the log file and console
Excellent! I'm glad it's working out.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
How would I go about creating a borderless CheckBox. I don't want it to display a border as I will be overlaying it onto an image that already has the border for the CheckBox.
|
|
|
|
|
Give checkbox border style to Groove
Thanks
Ramakrishna.J
SoftProSys.ltd.
|
|
|
|
|
I do not know if the string enter is number.
|
|
|
|
|
Here is one possible test implementation, but of course exceptions should not really be used like this (it is bad because an exception takes so much time to handle).
try
{
Convert.ToInt32(myString);
}
catch
{
}
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|