Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Kjetil Svendsen

@Kjetil Svendsen
About
Posts
42
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Replace in Regex
    K Kjetil Svendsen

    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

    C# csharp perl regex question

  • 3rd party list box?
    K Kjetil Svendsen

    Hi Have you tried listview. No databinding, but otherwise perfect Kjetil

    C# csharp database help tutorial question

  • windows service
    K Kjetil Svendsen

    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

    C# question sysadmin performance discussion

  • Regexp question
    K Kjetil Svendsen

    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

    C# question help tutorial

  • I give up... more source control...
    K Kjetil Svendsen

    Your team needs therapy. Kjetil

    The Lounge collaboration sharepoint tools help

  • Regexp question
    K Kjetil Svendsen

    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

    C# question help tutorial

  • Regexp question
    K Kjetil Svendsen

    Beautiful expression. But how do I name my groups? Kjetil

    C# question help tutorial

  • Regexp question
    K Kjetil Svendsen

    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

    C# question help tutorial

  • Problem with Date Validation
    K Kjetil Svendsen

    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

    C# help tutorial

  • What is the proper Domain Model for this relationship?
    K Kjetil Svendsen

    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

    C# question database design sales tutorial

  • ListView
    K Kjetil Svendsen

    Hi. Try setting

    ListView.HideSelection = false;

    Kjetil

    C#

  • Read null value(s) from cell of DataGridView
    K Kjetil Svendsen

    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

    C# help tutorial question

  • how avoid user to expnd my database on client pc [modified]
    K Kjetil Svendsen

    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

    Database database question

  • old value after validating event of datetimepicker
    K Kjetil Svendsen

    Hi. Try using the dateTimePicker_ValueChanged event Kjetil

    C# help tutorial question

  • OPENXML() and performance
    K Kjetil Svendsen

    Hi. I actually use insert into, but I was to lazy to paste the table declaration in my post :) Kjetil

    Database performance help sharepoint database xml

  • OPENXML() and performance
    K Kjetil Svendsen

    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

    Database performance help sharepoint database xml

  • Combobox problem
    K Kjetil Svendsen

    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

    C# csharp help database visual-studio winforms

  • Treeview Control
    K Kjetil Svendsen

    Hi Sorry. My mistake. I'm in a big WinForm project, and have "forgotten" all about Web :-) Kjetil

    C# question data-structures help

  • Treeview Control
    K Kjetil Svendsen

    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

    C# question data-structures help

  • OleDb INSERT statement, works if I do NOT prepare it, fails if I do...
    K Kjetil Svendsen

    Hi. Have you tried OleDbType.DBDate instead of OleDbType.Date ? Worth a try. Kjetil

    Database database oracle question career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups