Click here to Skip to main content
15,919,500 members

Comments by Member 10518995 (Top 8 by date)

Member 10518995 21-Jan-14 9:06am View    
to String
Member 10518995 15-Jan-14 9:03am View    
Thanks soooooooooooooooooooooooooooooooo much :)
Member 10518995 12-Jan-14 8:59am View    
Thanks for your help really i appreciate ur efforts can i ask u how to i can change the location when it comes to the next loop which shouldn't be the same each time
but i can't
Member 10518995 12-Jan-14 8:33am View    
DBClass db = DBClass.GetInstance();
string str = @"INSERT INTO [Picture_upload].[dbo].[Pictures]
([cont_id]
,[path])
VALUES
(" + obj + ",'" +
openFileDialog1.FileName + "')";
db.ExecuteNonQuery(str, CommandType.Text);



Member 10518995 12-Jan-14 8:28am View    
i don't know what you mean ?
i get the pic from openfiledialog , and saved under openfiledialog.filname and sved in database in entity called path varchar type in a table called pictures



class DBClass{
public void ExecuteNonQuery(string Query, CommandType type)
{

OpenConnection();
cmd.CommandText = Query;
cmd.CommandType = type;
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{

}
finally
{
ReleaseResource();
}
private void OpenConnection()
{
try
{
this.connection.Open();
}
catch
{ }
}

}