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
S

stormydaniels

@stormydaniels
About
Posts
13
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Generate report to Microsoft Word document
    S stormydaniels

    Hi, I have an ASP.NET application which currently generates a price list as a web page, complete with header and footer. I now need to offer the option of generating the same report as a Microsoft Word document. Ideally, the document would contain the header and footer just as the web page did but if necessary, the report would expand to two or more pages. Can someone suggest the best way of doing this? Is there a way to export a web page directly to Microsoft Word? Thanks for any help suggested :)

    ASP.NET csharp asp-net help question

  • Debug Statements - writing to the console and files
    S stormydaniels

    Thanks for all your answers - I'll look into each of the suggestions :)

    C# debugging help tutorial question announcement

  • Learning C# by example? Complete projects?
    S stormydaniels

    Don't worry about who I am. I'm just another person on the Internet who comes here for help and advice. If you don't want to answer his question, then that's fine but there was nothing constructive in what you posted. This is despite the fact that you can be a very positive contributor here and I've always had respect for your technical knowledge and experience. FWIW (you don't mind acronyms do you?), text-speak irritates me too and I don't blame you for not wishing to answer his question. However, it just seems like you enjoy being offended a little too much.

    C# learning csharp tutorial database sql-server

  • Debug Statements - writing to the console and files
    S stormydaniels

    Hi, I'm writing an application in which I'm currently using Console.Writeline() calls to output the various stages. This helps me to develop and debug as I go. However, the time will come when I want to remove all such calls. Can anyone suggest some advice, an article (I have searched on CP) or other source which will tell me how to use debug statements in code which I can then switch off for release. I was thinking of a logging class - in debug mode it would write to the console but in release mode it would write certain information to a file. The Console.Writeline() methods allows me to do the following: Console.Writeline("Val1 {0}, Val2 {2}", val1, val2); How could I write my own function which would accept an unknown number of parameters like this? I would like my function to pass the parameters directly to Console.Writeline() or to a file depending on a flag. Thanks for any help offered :)

    C# debugging help tutorial question announcement

  • Learning C# by example? Complete projects?
    S stormydaniels

    Give it a rest John. Everyone knows what he meant :sigh:

    C# learning csharp tutorial database sql-server

  • Handling a SELECT in a stored procedure
    S stormydaniels

    Thanks for such a carefully created answer - that's solved my problem perfectly and more importantly, helped me understand the issue I had. Thanks again :cool:

    Database database help question

  • Handling a SELECT in a stored procedure
    S stormydaniels

    Hi, I have a stored proc which retrieves a value from my database. If I select the value I then want to do a case statement and return a string. This is my code but I can't get it to work:

    create procedure procGetEventType
    (@EventID int, @EventHeading varchar(12))
    as
    declare@desc varchar(50)
    select @desc = 'Unknown event type'

    begin
    select [EventID], [EventHeading]
    from tblEvents
    where [EventID] = @EventID

    if ([EventHeading] = 'Info') desc = 'Information'
    if ([EventHeading] = 'Warn') desc = 'Warning'
    if ([EventHeading] = 'Error') desc = 'Error'

    return @desc
    end

    I can't even create the stored procedure because I get a syntax error. It complains about EventHeading being an invalid column heading and when I comment out the "if" lines it's OK. If I have done a select on a column can I not then refer to it later on? Any ideas? :confused:

    Database database help question

  • Opening/Closing Connections - Efficiency
    S stormydaniels

    Hello :) I have a program which must read a directory of files and update a database. I can open my connection at the program start and run the process but it may take a couple of minutes or so. Is is worth opening and closing the database connection for each record I update or can I just hold the connection open for minutes at a time and close it at the end of the process? Thanks :)

    Database database question announcement

  • Self integrity check of my program
    S stormydaniels

    Hi guys, What is the most common methodology to do a self integrity check on your program and quit in case of any kind of modification (like cracking attempts)? I did some research and CRC seems to be a good way but there are arguments about CRC vs MD5. Implementing md5 for self check is not possibe only if you use a preloader which extracts and checks the main program. You can't tell the md5 before you would compile your program. I looking for a solution which can be implemented into my program not a 3rd party exe protector (which is the easy way to do this).

    Managed C++/CLI question visual-studio

  • How can I use regex to match CSV record?
    S stormydaniels

    Please see my answer above :) Sorry, but I thought I wouldn't need to explain that I could get the record from the .csv text file.

    C# regex question help

  • How can I use regex to match CSV record?
    S stormydaniels

    Sorry for not being more clear. I will use a regular expression to validate my record I read from the .csv file. Like this:

    Regex regex = new Regex(expression);
    string[] parts = regex.Split(record);

    Sorry again :^)

    C# regex question help

  • How can I use regex to match CSV record?
    S stormydaniels

    My file contains records which look like this: EMPLOYEE001,M,20081105 First column is employee ID, second is gender and third is date. I want to read this from a comma separated variable text file and think a regular expression is the way to do it. I do not want to create a dataset from the file. Help much appreciated :)

    C# regex question help

  • Opinion on how to handle a DataSet
    S stormydaniels

    I have a DataSet which contains three rows with 4 columns in each row. I want to print out the contents of the DataSet so I have written this:

    foreach (DataRow row in MyDataSet.Tables[0].Rows)
    for (int i = 0; i < MyDataSet.Tables[0].Columns.Count; i++)
    Console.WriteLine("Value {0}", row.ItemArray[i]);

    Is there a better way than having a for statement and looking at the ItemArray? I tried the following but I only get the column names:

    foreach (DataRow row in MyDataSet.Tables[0].Rows)
    foreach (DataColumn column in dsUpdates.Tables[0].Columns)
    Console.Write(column.ToString());

    If I am missing the basics can someone tell me where or what to read to understand handling DataSets? :)

    Database tutorial question
  • Login

  • Don't have an account? Register

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