LoadRTF can't work when retrieve RTF data from database.

  •  09-10-2009, 2:33 AM

    LoadRTF can't work when retrieve RTF data from database.

    code snippet
    ------------------------------------
            SqlConnection cnn = new SqlConnection(" Data Source=servername;Initial Catalog=database;Persist Security Info=True;");
            SqlCommand cmd = new SqlCommand(" SELECT [COLUMN] FROM [TABLE] WHERE [ID]=@pID ", cnn);
            cmd.Parameters.Add(new SqlParameter("@pID", SqlDbType.Int));
            cmd.Parameters["@pID"].Value = 1;
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            using (cnn)
            {
                cnn.Open();
                sda.Fill(ds);
                if (null != ds) Editor1.LoadRTF(ds.Tables[0].Rows[0]["COLUMN"].ToString());
                cnn.Close();
            }
    -----------------------------
    And in this line *Editor1.LoadRTF(ds.Tables[0].Rows[0]["COLUMN"].ToString());*,it threw an error *can't find a part of the path *XXXX** something like this.
    I have go though the whole forums, but can't find any help.
    I'm not sure which did i miss? pls help.
    thanks.
    Filed under:
View Complete Thread