Hi. Does anyone know if it is possible to do a "search and replace" in the regex expression, without using the
RegEx.Replace
method? Alternatively: Does it exist a perl regex-library to be included i C# Kjetil
Hi. Does anyone know if it is possible to do a "search and replace" in the regex expression, without using the
RegEx.Replace
method? Alternatively: Does it exist a perl regex-library to be included i C# Kjetil
Hi Have you tried listview. No databinding, but otherwise perfect Kjetil
arkiboys wrote:
"Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service."
This mean that the service has done what it was programmed to do and exited. My guess is that there are some user property that prevents this user from doing the actual work inside the service: -Searching for a file in the wrong directory -Doesn't have the right settings -Hasn't mapped the correct network drive etc Kjetil
Hi. It still does not work. New problem: The user input is like this
Breakfast: Sliced Bread
Lunch: At McDonald's
(had some coffee and snack)
Dinner: Chicken
Supper: Mexican
and my match.Groups[0].Value is
Breakfast: Sliced Bread
Lunch: At McDonald's
instead of
Breakfast: Sliced Bread
Lunch: At McDonald's
Dinner: Chicken
Supper: Mexican
Why? This is starting to be embarrassing :) Kjetil
Your team needs therapy. Kjetil
Hi. I really appreciate your help, but I still need some help. RegExp is not my strongest side :-) I need to rephrase my question. My text input is more like: (I'm not allowed to use actual data from my project)
Breakfast: Sliced Bread
Lunch: At McDonald's
Dinner: Chicken
Supper: Mexican
and my task is to isolate what a person ate and save that info in my database. Different person might have different ways to report their meals. Each person has a consistent way though. There are ~150 persons and they all skip meals from time to time. Can you still help me ? Kjetil
Beautiful expression. But how do I name my groups? Kjetil
Hi. I have a text input like this:
a: a-related text
b: b-related text
c: c-related text
d: d-related text
e: e-related text
f: f-related text
and a expression like this:
(a\:\s*)(?.*)(\r\n)(b\:\s*)(?.*)(\r\n)(c\:\s*)(?.*)(\r\n)(d\:\s*)(?.*)(\r\n)(e\:\s*)(?.*)(\r\n)(f\:\s*)(?.*)(\r\n)
So far so good. The problem is that I never know how many of the lines a-f which is present. The text might look like this:
a: a-related text
c: c-related text
f: f-related text
or:
a: a-related text
b: b-related text
some strange text
f: f-related text
Any suggestion on how to write my expression? Kjetil
Verghese wrote:
did i explained the situation clearly..........pls see the code below:
Not sure :) Seems like you want to display only the rows witch have a non-empty date field. Try
myReport.SetDataSource(newPDS.Tables["TABLE_1"].Select("ADM_DATE IS NOT NULL"));
I'm not sure if this works with the SetDataSource method, but try it. Kjetil
Hi. Do you really need the customer relation in the product object? If your app has a customer point of view, my suggestion would be: Customer ..CustomerId ..Name ..AssignedProduct[] Products Product ..ProductId ..Name AssignedProduct : Product ..BasePrice ..DefaultPrefix Kjetil
Hi. Try setting
ListView.HideSelection = false;
Kjetil
Hi. Have you tried
if (string.IsNullOrEmpty(dataGridView1[5, e.RowIndex].Value.ToString()))
{
dataGridView1[5, e.RowIndex].Value = "0";
}
I think it should work. Kjetil
Hi. As long as the application users have their own login on the DB server, the only thing you can do is trusting then, which seems like a terrible bad idea. A quick, dirty and somewhat funny solution is password encryption: What they type is not what they use :) Try ROT13, gonna fool them all, and very easy to implement. Kjetil
Hi. Try using the dateTimePicker_ValueChanged event Kjetil
Hi. I actually use insert into, but I was to lazy to paste the table declaration in my post :) Kjetil
Hi. I have a stored procedure, and it's working fine. One of the input parameters is XML (@p_xml) and is processed like this:
DECLARE @docHandle int
EXEC sp_xml_preparedocument @docHandle OUTPUT, @p_xml
SELECT * INTO #raw_table
FROM
OPENXML(@docHandle, '//NODE', 2)
The problem is when the XML is really big (~20 MB with ~35000 nodes). Then the OPENXML statement uses 7-8 minutes to finish. Is there any way to speed up OPENXML, or is there any other workaround ? I have tried both select into and insert into and both temp table and table variable. All with the same result. Could someone help me ? Kjetil
Hi. You should databind:
Combobox1.DataSource = ds.Tables[0];
Combobox1.DisplayMember = "Column name for column to display";
Combobox1.ValueMember = "Column name for ID column";
Kjetil
Hi Sorry. My mistake. I'm in a big WinForm project, and have "forgotten" all about Web :-) Kjetil
Hi. first you have to find the node: TreeView.Nodes.Find Then select it: TreeView.SelectedNode = And you can do other stuff: TreeNode.Expand(); TreeNode.EnsureVisible(); Kjetil
Hi. Have you tried OleDbType.DBDate instead of OleDbType.Date ? Worth a try. Kjetil