|
Thank you very much, I got it
And thank you all friends
shanzy
|
|
|
|
|
hi, how can i find the date in the HTML Response string?
.....
13.09.2005
......
somth. goes wrong here:
<br />
Regex regex = new Regex(@"^([0-9]{1,2}).([0-9]{1,2}).([0-9]{4,4})$");<br />
Match m = regex.Match(HTMLResponseString);<br />
if(m.Success)<br />
{<br />
MessageBox.Show("found");<br />
}<br />
cu
|
|
|
|
|
what about
(?<Month>\d{1,2})[\./](?<Day>\d{1,2})[\./](?<Year>(?:\d{4}|\d{2}))
regards
-- modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi,
i use:
<br />
Regex regex = new Regex(@"(?<Day>\d{1,2})[\./](?<Month>\d{1,2})[\./](?<Year>(?:\d{4}|\d{2}))");<br />
perfect, where do you know the pattern <month> ?
but i dont want to recognize: 05/19/14 only like that: 13.09.2005
cu
|
|
|
|
|
and how can i recognize a date like:
13 Sep 2005
or
14 Okt 2006
or
07 Nov 2005
what about:
<br />
"(?\d{1,2})[\ /](?\w{3})[\ /](?(?:\d{4}|\d{2}))"<br />
cu
|
|
|
|
|
That would work:
(\d{2})\s(\w{3})\s(\d{4})
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You are specifying the start of the string (^) and the end of the string ($) in the pattern. If you remove these, you will find the date.
---
b { font-weight: normal; }
|
|
|
|
|
I need to create a .NET remoting SAO with a non-default constructor i.e. a constructor with parameters. Is this possible? and if so, how?
|
|
|
|
|
You can not use non default constructor with SAO you have to use default constructor if you need to use non default constructor use CAO instead
MCAD
|
|
|
|
|
How do you count the number of controls on a C# form. I mean suppose i have 3 textboxes on the form, i want my countr to return '3'.
|
|
|
|
|
Depends on how the controls are arranged in the form. If all are jst plain on the form form.Controls.Count should do what you want. If some controls sit within other controls (like panels, groupboxes etc) you will have to count recursively:
private int CountControls(Control control){
int result = 0;
foreach (Control subControl in control.Controls){
result++;
result += CountControls(subControl);
}
return result;
}
|
|
|
|
|
|
We need to implement better security into a C# Windows Desktop Application we are building, and are hoping to get best practices recommendations on the following:
1) "encrypted username / passwords" for connection strings -- actually any technique that will hide the connection string specifics from the user once, the application is built and put into an executable -- possibly by using the Registry.
2) Use of XML for pooling connection strings and the storing of username / passwords in the XML string: building a connection string based on settings in an XML File -- in some encrypted form... see 1) above...
3) NT Authentication for user login.
Thanks for any information you can give us.
Anne
|
|
|
|
|
I created a client application and it was working just fine on my machine but when I tried to install it to another machine it was giving me following error. Does any one know how to fix this?
Error:
An Error Occured: Unable to find an entry point named OCIEnvCreate in DLL oci.dll.
Stack Trace:
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject, Boolean& isInTransaction)
at System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(String encryptedConnectionString, OracleConnectionString options, OracleConnection owningObject, Boolean& isInTransaction)
at System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
at Invoice.Invoice.TransferData()
Also, how can you tell what version of oracle client is installed on your machine? Thank a lot in advance.
|
|
|
|
|
Hello,
I have:
SqlDataAdapter adapter = new SqlDataAdapter (conn.CreateCommand());<br />
adapter.SelectCommand.CommandText = "CREATE TABLE ea_CashFlowTest.....";<br />
adapter.Fill (this.dataset, "MyTable");<br />
;
Is there a way of executing this command:
adapter.SelectCommand.CommandText = "DROP TABLE ea_CashFlowTest";
So I can drop the table when I need to.
Thank you.
-- modified at 12:24 Tuesday 13th September, 2005
|
|
|
|
|
If you have sufficient permission you can call SqlCommand.ExecuteNonQuery();
MCAD
|
|
|
|
|
|
It looks like you are stuck in the mentality of using DataAdapters for everything. Remember that they are just higher level wrappers around existing functionality that is exposed else where. You are creating larger bulkier objects to do work that can easily be achieved with smaller more dynamic objects.
You should just create a SqlConnection and SqlCommand object and call ExecuteNonQuery() on it. e.g.
SqlConnection conn = new SqlConnection(myConnectionString);
SqlCommand cmd = new SqlCommand("DROP TABLE ea_CashFlowTest", conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
}
catch(SqlException ex)
{
}
finally
{
conn.Close();
}
I hope this helps.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thanks, I figured it out.
|
|
|
|
|
Hello,
Is there a way of adding a second header column to datagrid?
For example: first header will have "Pd1", "Pd2" .... headings
second header will have: "Jan", Feb", ...... headings.
Thank you
|
|
|
|
|
I try to call a java webservice from .NET. When calling one of the Webservice methods I get the error:
"There is an error in XML document (1, 339)".
I tracked down the SOAP XML response by a Tool called "TCPMonitor":
-------------------------------------------------------------------------------------
HTTP/1.1 100 Continue<br />
<br />
HTTP/1.1 200 OK<br />
Content-Type: text/xml;charset=utf-8<br />
Transfer-Encoding: chunked<br />
Date: Mon, 05 Sep 2005 17:07:28 GMT<br />
Server: Apache-Coyote/1.1<br />
<br />
2000<br />
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope<br />
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"<br />
xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />
...
-------------------------------------------------------------------------------------
I discovered that "Transfer-Encoding: chunked" and the "2000" mean, that the SOAP response is sended in chunked parts of 2000 (bits, characters ???) by the webserver. .NET doesn´t seem to be able to join the chunked parts back to one.
At least my question:
1. Is it possible to call the webmethod in C#, declaring to use only http/1.0? (to avoid the chunking of http/1.1)
or
2. Is it possible for .NET to read http/1.1, chunked SOAP messages in some way?
I still have to use .NET 1.1, so please do not refer to .Net 2.0.
(Sorry for the long text, but I thought the information could be interresting to anybody else with the same problem)
Thanks for any response
|
|
|
|
|
I try to call a java webservice from .NET. When calling one of the Webservice methods I get the error:
"There is an error in XML document (1, 339)".
I tracked down the SOAP XML response by a Tool called "TCPMonitor":
-------------------------------------------------------------------------------------
HTTP/1.1 100 Continue<br />
<br />
HTTP/1.1 200 OK<br />
Content-Type: text/xml;charset=utf-8<br />
Transfer-Encoding: chunked<br />
Date: Mon, 05 Sep 2005 17:07:28 GMT<br />
Server: Apache-Coyote/1.1<br />
<br />
2000<br />
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope<br />
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"<br />
xmlns:xsd="http://www.w3.org/2001/XMLSchema" <br />
...
-------------------------------------------------------------------------------------
I discovered that "Transfer-Encoding: chunked" and the "2000" mean, that the SOAP response is sended in chunked parts of 2000 (bits, characters ???) by the webserver. .NET doesn´t seem to be able to join the chunked parts back to one.
At least my question:
1. Is it possible to call the webmethod in C#, declaring to use only http/1.0? (to avoid the chunking of http/1.1)
or
2. Is it possible for .NET to read http/1.1, chunked SOAP messages in some way?
I still have to use .NET 1.1, so please do not refer to .Net 2.0.
(Sorry for the long text, but I thought the information could be interresting to anybody else with the same problem)
Thanks for any response
|
|
|
|
|
I ran into this problem a few years ago. I think the solution was to override GetWebRequest like this
override WebRequest GetWebRequest(Uri uri)
{
WebRequest request = base.GetWebRequest(uri);
request.ProtocolVersion = Version.Version10;
return request;
}
You probably have to do some casting and type checking for this to work, but I think this will do it.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I want to be able to create 2 forms when I press a button. I am using the following code.
{
frmMy1 frm1 = new frmMy1();
frmMy2 frm2 = new frmMy2();
frm1.ShowDialog(this);
frm2.ShowDialog(this);
frm1.Dispose();
frm1.Dispose();
}
When I run this I have to close the first form before the second form is displayed. Is there any way to get them both up at the same time.
Thanks
Liam
|
|
|
|
|
There are two ways to show forms: modal and nonmodal. Modal means that the form being displayed must be closed before any further execution. This is like when you close Notepad before saving and it asks you if you would like to save. You MUST answer the question (and close the form) before you can click on the main notepad form or continue doing anything else in Notepad. This also means that your code blocks until that form is closed. In other words, frm2.ShowDialog(this); doesnt execute until frm1 is closed. The second, nonmodal, does not have these restrictions and is simply a normal form.
In .NET, the Form class has two methods, Show() and ShowDialog(). Show corresponds to a nonmodal form, and ShowDialog() corresponds to a modal form. To fix your problem, simply use Show() instead of ShowDialog().
|
|
|
|