473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Binary file datagrid

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 "rows" (dates) in my file.
Is it the right way to do this ? should i do it with a dataset ? and then bind the grid to the dataset ? If yes how can I fill a dataset with a binary file ?
Sorry, but I'm a beginner in Visual c#....and Thanks a lot...
Nov 16 '05 #1
1 2438
hi
A dataset would be a better choice for your case, you can load the data
to it the same way you did with the datagrid. Once you fill it you can add
new columns to it for what ever data you want (note you will add columns to
specific table in your dataset).
DataTable US = new DataTable("us");

DataColumn date = new DataColumn("date");
US.Columns.Add(date);
MySet.Tables.Add(US)
///////////////////////////////////////////
Or (in case you already has the datatable object-will be the case with you)
Myset.Tables["US"].Columns.Add(date);

-- you can read more details about datasets on this link

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdatadatasetclasstopic.asp

Hope that would help,
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #2

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

Similar topics

13
by: yaipa | last post by:
What would be the common sense way of finding a binary pattern in a ..bin file, say some 200 bytes, and replacing it with an updated pattern of the same length at the same offset? Also, the...
28
by: wwj | last post by:
void main() { char* p="Hello"; printf("%s",p); *p='w'; printf("%s",p); }
9
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
0
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...
12
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: ...
7
by: John Dann | last post by:
I'm trying to read some binary data from a file created by another program. I know the binary file format but can't change or control the format. The binary data is organised such that it should...
3
by: Art | last post by:
Hi, I need some advice with a binary column in a DataGrid. Everything seems fine except for one thing. In order to check a box, I have to click on it once to select it, and then click again to...
3
by: nicolasg | last post by:
Hi, I'm trying to open a file (any file) in binary mode and save it inside a new text file. After that I want to read the source from the text file and save it back to the disk with its...
0
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:...
16
by: Erwin Moller | last post by:
Why is a binary file executable? Is any binary file executable? Is only binary file executable? Are all executable files binary? What is the connection between the attribute of binary and that of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.