Hi,
I do have a column named mime type which has the types like
html/word,text/plain etc.
my code is like this
string connstr="server =knowsys-server2;databas e=Argos;uid=sa" ;
string sql="SELECT AttachFilename, Attachment, MimeType FROM
EmailAttachment s WHERE AttachmentID = 7";
SqlConnection connection = new SqlConnection(c onnstr);
SqlCommand command = new SqlCommand(sql, connection);
connection.Open ();
SqlDataReader dr = command.Execute Reader();
System.Byte[] bytPassword = null;
string imgPassward = "";
while(dr.Read() )
{
bytPassword =
(System.Byte[])dr.GetValue(dr .GetOrdinal(("A ttachment")));
}
dr.Close();
imgPassward =
Encoding.ASCII. GetString(bytPa ssword).ToStrin g().Trim();
//string imgPasswa = Convert.ToBase6 4String(bytPass word);
//imgPasswar = (Encoding.UTF8. GetDecoder());
Response.Write( "atlast the string value is " + imgPassward);
but this works for only html\text types , for other types it returns me
an error.
it would be much helpfull if you could help me to solve this retrieving
problem
thanks,
kabin.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!