|
led mike wrote: Ok, um after seeing your code I guess I should warn you that you appear to be reinventing the wheel only yours is shaped like a square.
Hehe, and chromed too! My main purpose is experimenting to get a feel for this XmlTextReader thing...
Wout
|
|
|
|
|
If its your custom xml format then you will have an xsd for it. Use xsd.exe to spit out class definitions tagged up for deserialization.
|
|
|
|
|
Hi Guys,
Is there any way to restrict the files browsable in the FileBrowserDialog to a specific directory or sub directory? I've got two directories i want to browse the files in.
Anything like that exist?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Ive got an object that I inherit from DataTable and the overloaded constructor shown below
When I try to deserialize it i get the error
"The constructor to deserialize an object of type 'MyLibrary.CSVImport' was not found.
[Serializable]
public class CSVImport : DataTable
public CSVImport():base()
{
}
Project is target 2.0
I must have something missing that I need to do in order to deserialize the object. Below is the code that does the testing
DataTable dt;
FileStream fs = new FileStream(s3, FileMode.Open);
CSVImport csv = new CSVImport(fs,out err);
csv.SetFirstRowAsHeader();
// test serialization
fs = new FileStream(@"C:\test.bin", FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(fs, dt);
fs.Close();
fs = null;
bf = null;
dt = null;
fs = new FileStream(@"C:\test.bin", FileMode.Open);
bf = new BinaryFormatter();
dt = (DataTable)bf.Deserialize(fs);// Boom! Does not like this..
fs.Close();
|
|
|
|
|
If you inherit from a class which has a non-public deserialization constructor, you will have to implement it. Like:
public class CSVImport : DataTable
public CSVImport():base()
{
}
public CSVImport(SerializationInfo info,
StreamingContext context):base(info, context)
{
}
|
|
|
|
|
Thank you...
So in this case the parent DataTable has a non-public deserialization constructor?
|
|
|
|
|
|
I have a problem with binding data using BindingSource, typed dataset and DataGridView. My problem is: BindingSource, therefore grid, is empty after binding data (bindingSource.Count is 0). I couldn't figure out what I'm doing wrong and I'd be very happy if anyone could help me with this.
My application structure is like this: I have two assemblies, one is Winforms UI and other is database class library.
UI
-DataGridView, datasource as BindingSource
-BindingSource, datasource = DBAssembly.typedDataset, datamember = DBAssembly.typedDataset.myTable
Database DLL
-Sql Server CE database
-Typed Dataset
-DB class for database operations
UI Code
OnLoad
this.db = new DB();
db.BindData();
DB Code
constructor
create typedDataSet object
create typedDataSetTableAdapters.MyTableTableAdapter object
create typedDataSetTableAdapters.TableAdapterManager object
BindData()
this.myTableTableAdapter.Fill(this.typedDataSet.MyTable)
I'd appreciate any help with this
|
|
|
|
|
Hi,
Does anyone know what I should install for having support to Microsoft Access database in Entity Framework in Visual Studio 2008 ?
Currently, I see only SQL Server and SQL Server Compact Edition as available database type when I want to add an "ADO.NET Entity Data Model".
Thanks,
Fred
|
|
|
|
|
Access is not supported by the Entity Framework. You can use just about any other database, except Access. You can find providers for 3rd party databases here[^].
|
|
|
|
|
There's an upgrade-wizard in your Access-database that converts your database to SQL Server. You can then use SQL Server Express (a free download) in combination with VS2k8 and the EF.
HTH,
I are troll
|
|
|
|
|
Thanks, but this feature appears only in Access 2007, not in Access 2003. Thanks for the tips.
But the idea is to use a database in a file, so my program would be easy to install for each user.
What do you think of using SQL Server Compact Edition instead ? It seems to be greater than Access.
|
|
|
|
|
WolveFred2 wrote: this feature appears only in Access 2007, not in Access 2003
The feature is older then Access 2007. Might it be that you haven't installed all wizards during the installation of Office 2003?
WolveFred2 wrote: What do you think of using SQL Server Compact Edition instead ? It seems to be greater than Access.
I'd recommend SQLite
SQL CE is missing some features that you may have grown accustomed to in Access. OTOH, installing a SQL Server instance might be overkill if you're just going to save a bit of data locally.
I are troll
|
|
|
|
|
SQL Lite ? Does this work whith Entity Framework ?
For Access, I didn't use specific features. I prefere having a DBMS that looks like SQL Server.
|
|
|
|
|
According to this site[^]:
Site says:
Support for the ADO.NET 3.5 Entity Framework
Supports nearly all the entity framework functionality that Sql Server supports, and passes 99% of the tests in MS's EFQuerySamples demo application.
You might want to stick to SQL CE, as this already shows up default in your IDE
I are troll
|
|
|
|
|
Everytime i change the Assemblyinformations in Visual Studio (under Project Settings) - the "Assemblyversion" for example - and make a new Release after i do that,
the values of the Properties (in Settings.settings) are deleted and have the default-values again (not the values, the user has assigned to the properties, when he using
the program).
Example: The Property "Database-Path" hast the default"C:\\Database.mdb"
The user assigned in the program the value "C:\\Documents and Properties\\test\\Database.mdb" to the application-property.
After i change the Assemblyversion of the program and make a new release of the program, the Property "Database-Path" has the
default-value (C:\\Database.mdb) again.
Is there any way to avoid this?
Thanks for helping!
|
|
|
|
|
|
Hi,
I wud like to read the data from a bar-code reading device,but i dnt have any idea regarding that.
Plz help me out.
----------
Thanx in Advance
----------
|
|
|
|
|
Hi,
most barcode readers simulate key strokes, when you scan something. So, all you have to do is to use a texbox that will be focused, so that the barcode can be entered when the scanner scans the code. Just give it a simple try with notepad or any other editor.
Regards
Sebastian
|
|
|
|
|
Hi,
adding to the above, most bar code readers support a prefix and a postfix string that gets
added to whatever text got scanned. You can insert tabs, carriage returns, whatever suits your needs.
All this would be explained in the documentation. Did you read it?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Third time he's asked. Freakin' bar code questions. GOOGLE!
|
|
|
|
|
hello..
i wanted to know whether there is any way to restore the changed values in the property grid for the usercontrols created.
My problem is that i need to restore the values as and when changes are done in the grid.
|
|
|
|
|
shabanab wrote: i need to restore the values as and when changes are done in the grid
That would make the grid read-only, wouldn't it? How about just reloading all contents, or setting the grid to readonly?
I are troll
|
|
|
|
|
Hi Friends,I have a 100 MB XML File.Got suggestions from linked in that In C# XMLReader is the best for reading XML File..But when i use that reader for reading of size 100 MB XML File,its reading but some times hanging...could any body help how to proceed with XML reader with out stucking..?
|
|
|
|
|
If you have a UI and you mean to say the UI is hanging then implement your
reading code in a different thread. Search CodePr.. for threading etc ....
Caveat Emptor.
|
|
|
|