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
P

Pr teek B h

@Pr teek B h
About
Posts
47
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • create LogError file(C# Coding) [modified] for WindowsApplication
    P Pr teek B h

    jojoba2010 wrote:

    1. Where I save this log info. I mean shall i save them in XML or word File ?

    you can save the data anyways you want it. xml is structured and easier to browse through. text is easy to implement.

    jojoba2010 wrote:

    1. How can I have Log for error in try catch with this informations 1.Error Name : 2.Form Name: 3.Function Name that error occurred : 4.Date_Time when error occurred :

    void AddLogEntry(String errorName, String formName, String functionName)
    {
    DateTime entryTime = DateTime.Now;

    //depending on how you want to save the entry i.e. xml or plain text
    //append the text in the log file with the entry
    //search in google on how to add text to a text/xml file.
    }

    or, you can do this:

    void AddLogEntry(Exception ex)
    {
    String errorName = ex.message;
    String trace = ex.StackTrace; //stack trace will give you a brief history on why the error occured
    DateTime entryTime = DateTime.Now;

    //depending on how you want to save the entry i.e. xml or plain text
    //append the text in the log file with the entry
    //search in google on how to add text to a text/xml file.
    }

    hope this helps and good luck :)

    C# question csharp xml help

  • How to deploy c# project with vb6 project
    P Pr teek B h

    Hi, I have a project suite that is written in vb6. Since some of the programs in the suite don't work, I created the same programs in c#. How can I create a setup file that will have the rest of the vb6 projects and c# projects? Also, if this message doesn't belong to this message board, I apologize and would like it if you can tell me where I can ask this question. Thank you, Prateek

    C# question csharp json tutorial

  • Getting "OleDbCommand.Prepare method requires all parameters to have an explicitly set type." error while updating a dataset
    P Pr teek B h

    Thanks, I'll keep that in mind.

    Database help database question announcement

  • Getting "OleDbCommand.Prepare method requires all parameters to have an explicitly set type." error while updating a dataset
    P Pr teek B h

    Hi, I am using dataset to update/insert the data in the database. Whenever its about to update the dataset, it gives me the following error: "OleDbCommand.Prepare method requires all parameters to have an explicitly set type." Can somebody please help me with this problem? Here is my code:

    using (OleDbConnection conn = new OleDbConnection(ConnectionString))
    {
    try
    {
    conn.Open();
    OleDbCommand selectCmd = new OleDbCommand("select * from tableA where col1=? and col2=?", conn);
    selectCmd.Parameters.AddWithValue("@col1", val1);
    selectCmd.Parameters.AddWithValue("@col2", val2);

    OleDbDataAdapter adapter = new OleDbDataAdapter(selectCmd);
    OleDbCommandBuilder builder = new OleDbCommandBuilder(adapter);

    DataSet selectDS = new DataSet();
    adapter.Fill(selectDS, "TableA");

    DataTable table = selectDS.Tables["TableA"];
    DataRow row = null;

    int mode = 0; //0 = create, 1 = edit

    if (table.Rows.Count > 0)
    {
    row = table.Rows[0];
    mode = 1;
    }
    else
    {
    row = table.NewRow();
    }

    row["col1"] = val1;
    row["col2"] = val2;
    row["col3"] = val3;

    if (mode == 0)
    {
    table.Rows.Add(row);
    }

    adapter.Update(selectDS, "TableA"); // this is where the problem occurs
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message);
    }
    finally
    {
    conn.Close();
    }
    }

    Thank you, Prateek

    Database help database question announcement

  • Page loading.
    P Pr teek B h

    Sorry, I don't have any documents...but, if you view HTTP Headers while going to websites, you will notice the pattern. I noticed this when I was building a proxy. I could be wrong, but it would be worth it to check it out. Prateek p.s. do you have any documents supporting your theory? I would love to read up on this topic.

    ASP.NET csharp asp-net help

  • How come this If sentence doesnt work?
    P Pr teek B h

    Matjaž Grahek wrote:

    i want to check... if its enetered only 703 or 733

    I have no idea what the condition is. a) Do you want this.text = "OK" if text = 703 or 733? b) or do you want this.text = "Not Ok!" if text = 703 or 733?

    int textVal = 0;
    int.tryparse(textbox2.text, out textVal);

    if(textVal == 703 || textVal==733)
    {
    this.Text = "ok"; // Case 'a'
    this.Text = "Not Ok"; // Case 'b'
    }

    Matjaž Grahek wrote:

    b starts with 2,3,4 or 5

    here is a simple solution to that:

    int val = 0;
    int.tryparse(b[0].ToString(), out val)

    this should help, Prateek

    C# question

  • Page loading.
    P Pr teek B h

    I agree that the browser sends multiple requests in parallel but there is a procedure to it. It first sends the request to get the web pages. Then once it receives the response for those web pages, it then sends the request to receive the resources for the web page. Lets say, you have a default.aspx page that consists of image1.jpg and a main.aspx page that consists of image2.jpg. The browser will first send the request to get default.aspx and main.aspx. Once it receives the response for default.aspx, depending on what the response is, it will send the request for image1.jpg. Same goes for main.aspx i.e. once it receives the response for default.aspx, depending on what the response is, it will send the request for image2.jpg. Prateek

    ASP.NET csharp asp-net help

  • Page loading.
    P Pr teek B h

    actually...can you show your code. Something occurred to me and it might have something to do with how you have arranged your code. If you are loading the pictures before getting the file with the para, that might be why your pictures are loading before the para. Prateek

    ASP.NET csharp asp-net help

  • Page loading.
    P Pr teek B h

    Sorry for not replying sooner. After doing some research, I found out that when you send a request, the browser first loads up all of the main web pages e.g. main.aspx, default.aspx, etc. and then gets the other resources e.g. javascript files, images, etc. So the answer to your question is that the browser handles how the files are loaded and you really can't change the way the files are displayed. I apologize if this wasn't helpful, Prateek p.s. oh yeah, if you like to see how the web request work, i would download Live HTTP Headers for Firefox.

    ASP.NET csharp asp-net help

  • selecting a row programatically via Button
    P Pr teek B h

    You might want to write it something like this String test += gridview1.SelectedRow.Cells[i].Text; Otherwise you will only up with the text from the last selected row. Good job on solving the problem and thank you for solving the problem :), Prateek

    ASP.NET help question

  • Page loading.
    P Pr teek B h

    Let me get this straight. You want to display the para first and then the pictures to upload? Prateek

    ASP.NET csharp asp-net help

  • how can i write in Excel files and create spreadsheets using C# and
    P Pr teek B h

    Go to this link: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/ef11a193-54f3-407b-9374-9f5770fd9fd7/ Also, try this method as well: http://codebetter.com/blogs/peter.van.ooijen/archive/2005/10/20/133409.aspx Hope this helps :), Prateek

    C# question csharp help

  • YOUTUBE API with C#
    P Pr teek B h

    For future, please do not repost your question. Prateek

    C# tutorial csharp learning html css

  • YOUTUBE API with C#
    P Pr teek B h

    If you would like to learn asp.net and c#, then I would advice this book: Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Welcome to the world of C# :) Prateek

    C# tutorial csharp learning html css

  • Role of ports in sockets
    P Pr teek B h

    Can you post the code that you have? If not, you can check out the code on this page (http://msdn.microsoft.com/en-us/library/w89fhyex.aspx). I would advise going through this page first. It provides good, working examples of client server sockets. Hope this helps :), Prateek

    C# sysadmin csharp json

  • Application behaves differently when running in VS2005 and direct from exe file
    P Pr teek B h

    From what you have explained, it looks like the connection is timing out. Increasing the timeout time might fix the problem. Hope this helps :), Prateek

    C# sysadmin debugging help question learning

  • Assigning an icon to Windows Application
    P Pr teek B h

    Thanks a lot. That was very helpful information. :) Prateek

    C# help tutorial

  • Assigning an icon to Windows Application
    P Pr teek B h

    That's exactly what I did and found this code in the designer.

    this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

    I also tried looking for the filename, but couldn't find it. :( Where should I be looking? and/or what should I do now?

    C# help tutorial

  • Assigning an icon to Windows Application
    P Pr teek B h

    you mean

    this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

    but, what is "$this.Icon" referring to? and from where can I change the location of the icon? Prateek

    C# help tutorial

  • Assigning an icon to Windows Application
    P Pr teek B h

    Hi I am creating an application through which the user can select a mode and that will change the icon. I have added different icons to my project but don't know how to change the icon. Note: What I'm trying to do is not the same as going into properties in visual studios and changing the icon. Any help would be great. Thanks, Prateek

    C# help tutorial
  • Login

  • Don't have an account? Register

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