473,974 Members | 9,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DESPERATE - dataGrid with binary values

zw
Hi

I have problems displaying binary values on cells on the GUI.
The program crashed with following dialog box:

"The following exception occurred in the DataGridView:
System.Argument Exception: Parameter is not valid
at System.Drawing. Image.FromStrea m(...
at System.Drawing. ImageConverter. ConvertFrom(...
at System.Windows. Forms.Formatter .FormatObjectIn ternal(...
at System.Windows. Forms.Formatter .FormatObject(. ..
at System.Windows. Forms.DataGridV iewCell.GetForm attedValue(...

To replace the default dialog please handle the DataError event."

source code
==========
:
:

string query = "SELECT * FROM icc.provisionin g";

//Retreive the table that holds user profile information
DataSet ds = new DataSet("Provis ioning");
adapter.Fill(ds , rs, "Provisioning") ;
adapter.TableMa ppings.Add("Tab le", "Provisioning") ;
dataGridView1.D ataSource =
ds.Tables["Provisioni ng"].DefaultView;

:
:
TimesTen database data
=============== ====
Commanddescribe icc.provisionin g;

Table ICC.PROVISIONIN G:
Columns:
* BU VARCHAR (30) INLINE NOT NULL
KI BINARY (32)
TIMESTM BINARY (8)

1 table found.
(primary key columns are indicated with *)

Commandselect * from icc.provisionin g;
< iden,
000000000000000 000000000000000 000000000000000 000000000000000 0000,
4625F296000625D 1 >
How do I overcome this to display binary values in datagrid ?
Are there excellent books for programming Windows Forms and database ?
I'm a novice programmer.

Any help is appreciated.

Apr 26 '07 #1
0 1373

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
248
by: Marie | last post by:
Hello, Could you help me ?? I have to modify a binary file (containing dates) : I want to access all records ie add,delete,and modify the dates in the binary file. I do not have experience with C#, so I thought that a datagrid was the right way to do this. So I did it, load the file in the grid (not so simple for a beginner ), and now i just can't add row to my datagrid (modifying dates is OK), and it's a problem, really need to add...
6
1258
by: szabelin | last post by:
Hi, I was wondering if there is a way to have a BoundColumn in DataGrid, but not display it? Basically I would like to have a primary key hidden (and I need this for edits and deletes). I know I could store DataSet in the viewstate or session, but I was just curios if DataGrid offers something (kind of like Stringray's grid allowing you to associate a row with data in a void* )
3
4947
by: Kevin Pedersen | last post by:
Hello, I am using an editable datagrid. After I save the changes the datagrid shows the old values. I've read the posts about the Page_Load and not binding the datagrid each time. The SQL that is being sent to the database is correct and the changes are eventually being made. If I refresh the page after the update then the new values appear. I noticed that when I put a breakpoint in my update handler everything works fine. When I take...
1
1725
by: Sajid | last post by:
Hello! Experts, I have the following piece of code in VB.NET that I want to use to update any records in the database. I would like to use a code as well as DataGrid to update the records. Please guide me how can I achieve it. I know there is an Update command to to do this that but since I am a newbie I don't know how? I'll be really grateful to those who may help me buy modifying the following code. I am really desperately looking for...
6
3781
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns corresponding to permissions to certain data classes. I want to put the permission values in combo boxes in the grid and instead of displaying the numeric values, have the combo box display a string that corresponds to the numeric value (i.e. No...
0
2931
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string strDataValueField; string strDataTextField; public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
9
2739
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
0
312
by: zw | last post by:
Hi I have problems displaying binary values on cells on the GUI. The program crashed with following dialog box: "The following exception occurred in the DataGridView: System.ArgumentException: Parameter is not valid at System.Drawing.Image.FromStream(... at System.Drawing.ImageConverter.ConvertFrom(... at System.Windows.Forms.Formatter.FormatObjectInternal(...
2
2810
by: pozze | last post by:
Hi, I need to display images and other record information retrieved from an SQL 2005 database in a datagrid on a web page. I'm coding in VB .net I have recently changed over from VB ASP and i'm still getting used to .net I can successfully upload images and other data into the SQL Database, I'm currently storing RecordID, File Name, Type of File (mime), File Size, and File Data. I can retreive non binary data to a datagrid but I cannot...
0
10348
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10161
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10901
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8453
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6410
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6546
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4726
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.