473,507 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parameter is not valid.

3 New Member
Expand|Select|Wrap|Line Numbers
  1. FRM_ADD_PRODUCT frm = new FRM_ADD_PRODUCT();
  2.             frm.txtRef.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
  3.             frm.txtDesc.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
  4.             frm.textQte.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
  5.             frm.txtPrice.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
  6.             frm.cmbCat.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
  7.             frm.Text = "تحديث المنتجات:" + this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
  8.             frm.btnAdd.Text = "تحديث :";
  9.             frm.state = "update";
  10.             frm.txtRef.ReadOnly = true;
  11.             byte[] image = (byte[])prd.GET_IMAGE_PRODUCTS(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()).Rows[0][0];
  12.             MemoryStream ms = new MemoryStream(image);
  13.             frm.Pbox.Image = Image.FromStream(ms);//here is the error 
  14.             frm.ShowDialog();
  15.  
  16.  
Attached Images
File Type: jpg Capture1.jpg (63.7 KB, 194 views)
File Type: jpg Capture4.jpg (73.3 KB, 221 views)
May 10 '15 #1
3 2189
abduljalil
3 New Member
please i need help it's it is an urgent matter
May 10 '15 #2
Luuk
1,047 Recognized Expert Top Contributor
Yes, urgent, as in need an answer now......

But what is this piece of code supposed to do?
What is 'Image', it's not clear from this context.

You could surround the code with a try{} block, and catch the exception.....
May 10 '15 #3
abduljalil
3 New Member
dear luuk
this code help me when there is product need to update or edit i have get the picture of the product
May 11 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1987
by: muser | last post by:
How can I pass the parameter " long part_num, into a case statement. Case statement follows the function CheckDigit. i.e. CheckDigit( something, temp1 ); Thank you for your help in advance. ...
4
2910
by: Oldhandandy | last post by:
Since upgrading to .Net 2003, when I run report reports within an application using CrystalReportViewer, I'm getting the error "Specified Cast is not Valid". A value is being passed into the report.
9
1850
by: Mike | last post by:
After reading much on the evils of eval, I have a question using my own personal use of the function... We have a reports system that will generate reports based on a number of parameters...
4
2717
by: wkaras | last post by:
I would like to propose the following changes to the C++ Standard, the goal of which are to provide an improved ability to specify the constraints on type parameters to templates. Let me say from...
4
16952
by: Todd Perkins | last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually rely on google. So I hope I have enough info contained. Thank you in advance for any help! Problem: I am getting...
9
5795
by: subdhar | last post by:
I'm getting following error in asp.net application.I search the web and couldn't find error like this can any one help me in trouble with this error Specified argument was out of the range of...
0
4779
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
10
16379
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not...
7
13104
by: George | last post by:
Hi, Does anyone know how Control.Invoke can invoke a method which has ref parameters? For example, class A { public delegate MyFuncHandler(ref int i, ref int j);
11
13173
by: Kurda Yon | last post by:
Hi, I got this warning: mysql_query(): 4 is not a valid MySQL-Link resource. The line which cause this warning is: mysql_query("insert into $tablename (id,priority) values('$id', '0.00')",...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.