User Profile

Collapse

Profile Sidebar

Collapse
virtuoso
virtuoso
Last Activity: Jun 9 '10, 08:05 AM
Joined: May 10 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • virtuoso
    replied to problem whit datareader
    As I said, it's only a sketch; Inste of "..." is a large code that is irrelevant to my problem so I put "..." insted of it; I put only the code that count, that can cause my problem;...
    See more | Go to post

    Leave a comment:


  • virtuoso
    replied to problem whit datareader
    this is exactly what i did :) and in the begining I specified what part dont't work; that part alone is irelevant;
    See more | Go to post

    Leave a comment:


  • virtuoso
    started a topic problem whit datareader

    problem whit datareader

    I have a prpblem with the following code ( a sketch of it); cmd works fine but cmd2 not; Whit query2 I want to extract a value form database but even if the value exist the " if (dr.HasRows) " pass it and go to "else {//}". I hope you will understand what I'm trying to say.

    Code:
    string query ="select..."
    string query2 = "select..."
     MySqlCommand cmd = new MySqlCommand(query, connection);
    ...
    See more | Go to post

  • Thanks for the answer;
    I manage to solve the problme. Now my ode looks like this:

    Code:
    # string query1 = "UPDATE Movie set pret = pret + '" + i + "'";
    # string query2 = "UPDATE Movie set pret = pret - " + i + "";
    form query2 i delete the ' ' but query1 looks just as before and works fine; I's strange but it's work;
    See more | Go to post

    Leave a comment:


  • Error:Index and length must refer to a location within the string.

    Hi,
    what is rong with my code?

    Code:
    int i = int.Parse(txtpret.Text);
                    string query1 = "UPDATE Movie set pret = pret + '" + i + "'";
                    string query2 = "UPDATE Movie set pret = pret - '" + i + "'";
                   
                    MySqlCommand cmd1 = new MySqlCommand(query1, connection);
                    MySqlCommand cmd2
    ...
    See more | Go to post

  • virtuoso
    replied to binding blob with picturebox
    I manage to take the picture form the database but I can't put it in the picturebox because it give an erroar : "A generic error occurred in GDI+."

    Code:
     MySqlDataReader dr;
                 dr = cmd.ExecuteReader();
                    
                 if (dr.HasRows)
                 {
                    while (dr.Read())
                    {
                    MemoryStream ms = new MemoryStream((byte[])dr["poza"]);
    ...
    See more | Go to post

    Leave a comment:


  • virtuoso
    replied to binding blob with picturebox
    Thank you, I'll try then to fix the problem.
    (I'm from Romania)
    See more | Go to post

    Leave a comment:


  • virtuoso
    replied to binding blob with picturebox
    I don't know why but my browser can't find the server. An exact answer would be much better than reading some general info about this; I tried that but since I'm a novice, without much results.
    See more | Go to post

    Leave a comment:


  • virtuoso
    replied to binding blob with picturebox
    I can't open the link. Anyway, befor I post the question i do a lot of reading on this topic but without result. And because of that I post the question, as a last try :)
    See more | Go to post

    Leave a comment:


  • virtuoso
    started a topic binding blob with picturebox

    binding blob with picturebox

    Hi,
    I'm a beginer in c sharp and I can't pass over a problem. I would like to bind a blob field (mysql) with a picturebox in c sharp;

    here is the code:

    Code:
    string query = "Select name,director,picture from Movies where Movies.name='" + search + "'";
                    //create command and assign the query and connection from the constructor
                    MySqlCommand cmd = new MySqlCommand(query,
    ...
    See more | Go to post
    Last edited by tlhintoq; May 10 '10, 02:34 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
No activity results to display
Show More
Working...