none
store rtf data into sql database RRS feed

  • Question

  • Hello, how can I retrieve the character codes when datatype is varbinary. It only gave the "System.Byte[]" string. Here is my code:

            public String getTextText(string name)
            {
                DataTable myData = new DataTable();
                SQLiteCommand cmd;
                SQLiteDataAdapter adptr = new SQLiteDataAdapter(); ;
                SQLiteConnection con = new SQLiteConnection("Data Source=database.db;Version=3;New=False;Compress=True;");
                con.Open();
                cmd = con.CreateCommand();
                string sql = "SELECT * FROM parent where name ='" + name + "' ";
                cmd.CommandText = sql;
                adptr.SelectCommand = cmd;
                adptr.Fill(myData);
                con.Close();
                return myData.Rows[0][1].ToString();
            }

    • Moved by Bob Beauchemin Thursday, May 9, 2013 10:02 PM Moved to a more appropriate forum
    Thursday, May 9, 2013 5:25 PM

All replies