|
|
I think it perhaps difficult. But you can try to use following statement to search it.
keywords site:YourWebsite.com
|
|
|
|
|
i am trying to store a image in sqlserver database, but doesnt effect.
help me.
public class Item
{
private int code;
private string name;
private float price;
private Category category;
private byte[] photo;
public Item()
{
}
public Item(int code, string name)
{
this.Code = code;
this.Name = name;
}
public Item(int code, string name, float price) : this(code,name)
{
this.Price = price;
}
public int Code
{
get
{
return this.code;
}
set
{
this.code = value;
}
}
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
public float Price
{
get
{
return this.price;
}
set
{
this.price = value;
}
}
public Category Category
{
get
{
return this.category;
}
set
{
this.category = value;
}
}
public byte[] Photo
{
get { return this.photo; }
set { this.photo = value; }
}
}
public class ItemsDAL
{
private string selectItemByCode = "Select * from ItemsWithCategory where code=@code";
private string selectAllItems = "Select * from ItemWithCategory"; // View
private string insertItem = "InsertImage";
public void InserItem(Item pic)
{
SqlConnection con = new SqlConnection(DALHelper.ConnectionString);
SqlCommand cmd = new SqlCommand(this.insertItem,con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = this.insertItem;
cmd.Parameters.Add(new SqlParameter("@photo", pic.Photo));
con.Open();
try
{
cmd.Parameters["@photo"].Value = pic.Photo;
cmd.ExecuteNonQuery();
}
finally
{
con.Close();
}
}
}
public partial class ManageItemsForm : BaseForm
{
Item itm;
ItemsDAL itemDal = new ItemsDAL();
MemoryStream mem = new MemoryStream();
public ManageItemsForm()
{
InitializeComponent();
itm = new Item();
}
private void selectImageToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult r = this.openFileDialog1.ShowDialog(this);
if (r == DialogResult.OK)
{
pbxItem.Image = Image.FromFile(openFileDialog1.FileName);
this.pbxItem.BorderStyle = BorderStyle.None;
}
}
private void tabPage1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
itm.Photo = mem.GetBuffer();
itemDal.InserItem();
this.pbxItem.Image.Save(mem, this.pbxItem.Image.RawFormat);
Dotnet67.Sales.Persons.Customer c = new Dotnet67.Sales.Persons.Customer();
c.Name = txtName.Text;
}
}
Maifs
|
|
|
|
|
refer : GridView all in one[^]
//in this i have stored image and retrived in grid and also in another page. Download the sample project and see.
Padmanabhan
|
|
|
|
|
but i dont have to save in grid view. i want to keep it in separate for single person
Maifs
|
|
|
|
|
Ola,
Que pasa. No tengo yo mas o mucho experiencia ahorita. Los todos son mi problema, estoy bueno o no???
|
|
|
|
|
Ola,
Que pasa. No tengo yo mas o mucho experiencia ahorita. Los todos son mi problema, estoy bueno o no???
<a href=""></a>
|
|
|
|
|
|
|
My response was to Tory Russel, not you. His post was damaging to the eyes.
|
|
|
|
|
ok but if can reply my post then do it.
Maifs
|
|
|
|
|
Try asking in the ASP.NET [^] forum, you might have better luck.
|
|
|
|
|
is there no one which can reply me?
Maifs
|
|
|
|
|
No, I am not experienced enough in ASP.NET / Sql to help you out. In the ASP.NET forum you will find more help.
|
|
|
|
|
|
I propose you stop posting questions for a minimum of 3 months. It's apparently that you are attempting to code (poorly) malicious software. If you are not coding malicious software (albeit poorly written malicious software) then your entire design is wrong. If you are 'exploring the security' of .net as you said in your thread on page 4, then you are going about it in the wrong way.
So again, I propose to you, to save you from further ridicule, embarassement and extreme heckling, go away and don't come back for 2 months. By then, you would have hopefully saved up enough money to purchase a C# book and read chapters [1-2], which will give you a strong enough base where you can understand basic principles as file I/O. Give yourself a shot and even try chapters [3-4], and one day, you will be able to even read the entire book! It shouldn't take you more then 1 month to pick up basic programming principles, you said you've been at it for 6. Well, maybe there is a design flaw with the way you are trying to learn C#.
Go get a book, for the love of God please, this isn't even entertainment anymore.
|
|
|
|
|
EliottA wrote: this isn't even entertainment anymore
Oh I don't know. Its a bit low-brow but its still entertainment.
|
|
|
|
|
Ola, Mi Tia Loyce^,
Que tal???? No mas?? P ero, estas que bueno, que bueno.
Pero necisito que ir ahora.
Mas tarde cuando lo necisito,
Troy nbsp; nbsp; nbsp; nbsp; nbsp;
|
|
|
|
|
This is an English speaking site. Keep it in English or don't post at all...
|
|
|
|
|
Depends on the book.
I have a copy of "C# for Dummies" and it is arranged "properly", starting with the basics and building up.
But I glanced through a copy of "Teach Yourself C# in 21 Days" the other day and it's dreadful -- chapter one is on WinForms!
I doubt a beginner knows enough to even pick the right book.
|
|
|
|
|
He really needs to stop asking questions about basics and learn them from a well organized book.
|
|
|
|
|
Various people may have mentioned this to him, one or twice.
I think the phrase "and don't come out until you have read them" came up a few times, too.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi
Got error during debuging C#.net project-> "could not found microsoft.windows.common language runtime version=1.0.2.0.50"
Help me!!
|
|
|
|
|
Do you have the .net framework installed?
|
|
|
|
|
Ya.i have it.is there possibility that file must be currept due to virus?
How can i taggle wid this?
|
|
|
|