User Profile

Collapse

Profile Sidebar

Collapse
cathy25
cathy25
Last Activity: Jul 9 '09, 02:13 PM
Joined: Oct 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Could not load the file exception when trying to read a file with StreamReader

    Hi,

    I am using the following code to read a file.

    DirectoryInfo dir = new DirectoryInfo(@ "C:\");
    try
    {
    if (dir.Exists)
    {
    FileInfo[] csvfiles = dir.GetFiles("* .csv");
    foreach (FileInfo file in csvfiles)
    {
    ...
    See more | Go to post

  • Migrating DTS Packages from SQL server 2000 to SQL server 2005

    Hi,
    we are planning on migrating our sql from version 2000 to 2005 (I know SQL 2005 is in market from a while). As a part of testing, i have installed sql server 2005 on my development box and able to restore all databases from the production. When it came to DTS packages, I have used SSMS to migrate them by going into Management --> Legacy --> Data Transformation Services --> RC and selected Migrate Wizard. I have gone through the...
    See more | Go to post

  • Thanks for your reply.
    But, when I try to execute in the way you have mentioned above, it is giving me the following error at the sub procedure.
    "An object reference is required for the non static field,method or property uploadreports.p rogram.upload(s tring,string)"
    Any idea how to fix it?
    See more | Go to post

    Leave a comment:


  • How to call a sub procedure in a console application?

    Hi,
    I want to use a sub procedure called upload as follows in a console application.
    Code:
    namespace uploadreports
    {
    class program
    {
    static void Main(string[] args)
    {
    public void upload(name1,name2
    {
    //my code
    }
    upload(name1,name2);
    upload(name3,name4);
     
    }
    }
    }

    But, if i try to call it in this way, it is giving error under...
    See more | Go to post
    Last edited by Frinavale; Jan 22 '09, 05:41 PM. Reason: Moved to C# Answers from ASP.NEt and added [code] tags

  • cathy25
    replied to How to find the duplicate items in a list?
    Yes! it worked. Thanks mldisiblo.
    See more | Go to post

    Leave a comment:


  • cathy25
    replied to How to find the duplicate items in a list?
    for (int i = 1; i <= 15; i++)
    {
    string firstId = FirstItemId[i].ToString();
    string secondId = FirstItemId[i+1].ToString();
    if (firstId == secondId)
    {
    MessageBox.Show ("Duplicate Item exists....,Syst em is resetting it to blank! If you would like to change it, open the form again");
    ...
    See more | Go to post

    Leave a comment:


  • cathy25
    replied to How to find the duplicate items in a list?
    Thanks for your reply. But, in my case, I don't have any lists.
    we are loading the user input as follows

    for(int i=1;i<=15;i++)
    {
    string FirstItem=ID1.t ext
    }

    ...like this. Then how can I use this in my foreach statment?

    TIA
    See more | Go to post

    Leave a comment:


  • cathy25
    started a topic How to find the duplicate items in a list?

    How to find the duplicate items in a list?

    Hi,
    My requirement is to check for duplicate items in a list of 16 strings.They will be entered by users like this...Item1,It em2,Item3....It em16. I need to check for the repeated items if any exists and need to reset it to zero or null.
    Could any body point me in a direction to write the logic in C#?

    Thanks,
    Cathy
    See more | Go to post

  • cathy25
    started a topic How to open a folder in VS 2005
    in .NET

    How to open a folder in VS 2005

    I am a newbie in using vs 2005. I have a folder which contains some 20 .aspx and 20 .aspx.cs pages and some other css and javascript files with in it. It is a project folder. How can I open this entire folder in VS 2005 without opening each file one by one?
    See more | Go to post

  • cathy25
    replied to Retrieve a record on itemid
    in .NET
    Thanks! It worked.
    A small + can make a world of difference.
    See more | Go to post

    Leave a comment:


  • cathy25
    started a topic Retrieve a record on itemid
    in .NET

    Retrieve a record on itemid

    Hi all,

    My requirement is to allow users to enter partno. in a text box.
    There is a button called 'populate'. whenever the user enters a partno. and hits on populate button, the matching record from the database should show up on the screen. Each field in the databse got corresponding textboxes on the screen.
    I have used the following code:
    under Button_Click event,
    Code:
    SqlConnection MyConnection = new SqlConnection(Mysqlconnectionstring);
    ...
    See more | Go to post
    Last edited by Curtis Rutland; Oct 16 '08, 02:57 PM. Reason: added [CODE] [/CODE] tags, use them when posting code.

  • cathy25
    replied to Help in writing SQL query
    OK! I think these are the new functions in SQL Server 2005.
    But, I am using SQL Server 2000.
    See more | Go to post

    Leave a comment:


  • cathy25
    replied to Help in writing SQL query
    What is this Dense_Rank() function in the query?
    See more | Go to post

    Leave a comment:


  • cathy25
    started a topic Help in writing SQL query

    Help in writing SQL query

    Hi,
    I have a table like this with two fields Field1,Field2.

    Field 1 Field 2

    00345 Hello world
    00456 Hello world
    09934 Hello world
    78900 New filed
    12345 New filed...
    See more | Go to post

  • cathy25
    replied to Need Help On Multiple Max Values
    Another way of the same query is

    Select Phonenum,max(la stcalled) from Table
    group by Phonenum
    order by Phonenum
    See more | Go to post

    Leave a comment:


  • cathy25
    started a topic C# variables question
    in .NET

    C# variables question

    Hi,

    Is it possible to declare a variable in On_load event of a page and use the same variable in On_click event (button) of the same page?
    If yes, How do we need to declare the variable?

    Can any body reply me.

    Thanks
    See more | Go to post

  • cathy25
    replied to How to Update the XML file
    in .NET
    I have also tried by changing the out stream as

    MemoryStream outStream = new MemoryStream(AP QPFile.GetHashC ode ());

    still it is not updating the xml file.

    Please any body give me reply.
    See more | Go to post

    Leave a comment:


  • cathy25
    started a topic How to Update the XML file
    in .NET

    How to Update the XML file

    Hi,

    I am trying to get data from a xml file, and I am trying to update the xml file depending on some condition.
    I wrote the following code.
    [code=cpp]
    MemoryStream inStream = new MemoryStream(MY File.OpenBinary ());
    XmlTextReader reader = new XmlTextReader(i nStream);
    XmlDocument xd = new XmlDocument();
    xd.Load(reader) ;
    reader.Close();...
    See more | Go to post
    Last edited by Frinavale; Nov 16 '07, 07:44 PM. Reason: Added [code] tags

  • Thank you very much.
    It is working now.
    I was missing that logic.

    Thanks
    See more | Go to post

    Leave a comment:


  • I am not getting any error at the code. But I think the logic will be different for my requirement. Please help me finding out the logic.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...