strongly-typed-dataset

.NET - Is there a way to programmatically fill all tables in a strongly-typed dataset?

Hello, all! I have a SQL Server database for which I have created a strongly-typed DataSet (using the DataSet Designer in Visual Studio 2008), so all the adapters and select commands and whatnot were created for me by the wizard. It's a small database with largely static data, so I would like to pull the contents of this DB in its en...

Can I configure a strongly typed data set to use nullable values?

If I have a strongly typed data table with a column for values of type Int32, and this column allows nulls, then I'll get an exception if I do this for a row where the value is null: int value = row.CustomValue; Instead I need to do this: if (!row.IsCustomValueNull()) { int value = row.CustomValue; // do something with this v...

Visual studio 2010 crashes when designing datasets

I am working on a project with approx 75 strongly typed datasets that was upgraded from VS 2008 (which was previously upgraded from VS 2005). Visual studio crashes often while editing these datasets. Has anyone else seen this issue? Is there a workaround of any sort? ...

problem with null column

One column in my database (of type double) has some null values. I am executing a sored procedure to get the data in my app wipDBTableAdapters.XLSFacturiTableAdapter TAFacturi = new wipDBTableAdapters.XLSFacturiTableAdapter(); var dtfacturi = TAFacturi.GetData(CodProiect); Then i try to do something like this: if (dtf...

.NET Database application guidance.

Hello, I'm stumbling in the data wilderness and feel very lost, so i am asking for help. I have done some database apps in VS (C#) winforms for some time, wpf lately. These are small to medium apps (embedded dbs, a bit of sql server), like a restaurants, cash registers and similar. (15-20 tables) Until now, i have done all my datasets b...

Warning C4564 when building C++/CLI project that consumes strong-typed dataset

After upgrade to VC++ 2010, Warning C4564 is raised (method defines unsupported default parameter) when building a C++/CLI project that consumes a strong-typed dataset from a C# project. ReadersManager.cpp(311): warning C4564: method 'SetNewRecord' of class 'System::Data::DataTable' defines unsupported default parameter 'action' 3> ...

Insert a NULL Date field into a Strongly Typed Dataset without getting a System.InvalidCastException

System.Data.StrongTypingException("The value for column 'CS_REPLY_DATE' in table 'CSAA_STATUS' is DBNull." I am using an Xmldataset .XSD connecting SQL Server 2005 tables, the dates I want to null out upon Initial insertion of a row into the table. The table date field allow nulls. I am using a strongly typed xsd table row and the ...

VS.NET 2008 Dataset TableAdapter wizard connecting to Oracle -- any way to control the DataType for columns it creates?

Quick summary: When using the TableAdapter Configuration Wizard for typed datasets, the wizard does some implicit mapping from Oracle datatypes to .NET datatypes. Does anyone know how I can access & modify that mapping logic? In more detail: I often create strongly-typed datasets against an Oracle database (using either the "Oracle Dat...

Logging Database Row alteration

I am using a strongly typed dataset in my C# application and I would like to be able to log any changes a user makes to a row. What is the best way to do this? ...

xml and strongly-typed datasets with the dataset designer

I'm not sure if this is possible but here is what I want to do: I have created a strongly-typed dataset, StrTypDS using the dataset designer in Visual Studio. I have also created an blank xml file and added it to my project as a Resource so that it can be accessed through Properties.Resources.xmlData. The what I would like to do is read ...

Concat Columns with NULL-values

I want to concat two Columns in the TableAdapter Wizard of the VS Dataset-Designer. The problem is that one column has NULL-Values and hence the concatination results in NULL regardless of the value of the other column. I've found out that i must SET CONCAT_NULL_YIELDS_NULL OFF, which is a Database option. How can i change this setting ...

Getting one row from a Strongly Typed dataset without getting who table

I currently have this code: /// <summary> /// This is an ineffecient method of getting a tenant by their id. /// </summary> /// <param name="id">int ID of the tenant to be selected</param> /// <returns>Tenant with the specific ID, or null if not found.</returns> public static Tenant GetTenantByID(int id){ ...

SqlBulkCopy with Byte[] DataTable column error

Hello, I have a strongly typed dataset containing a datatable with one of the columns as a byte[] column that I'm trying to insert into a binary(4) database table field. I'm able to set the byte[] column values without any problems, but I receive the following exception when I run sqlbulkcopy on the datatable: "The given value of type ...

Can someone please clarify the key difference between Entity Framework and Typed Datasets?

I am comparing the EF and typed datasets for their usefulness. I was failing to see why you would use the EF over typed datasets if the EF is bound to SQL Server only. But is it true that the Linq statements in EF are evaluated late in the respect that if you did something like: db.Customers.where(c => c.Name == "John Smith") The EF w...

Nullable types in strongly-typed datatables/datasets - workarounds?

Strongly-typed DataTables support "nullable" field types, except that the designer will not allow you change the setting to "allow nulls" for any value type fields. (ie: String types allow nullable, but int's do not). The workaround is to call IsMyFieldNull() any time you want to get Myfield. If you access MyField when it does contain ...

Populating related datasets from a table adapter

I'm using table adapters and datasets in .NET (version 2.0). I have two tables like this: Table1 ------ ... TypeId Table2 ------ Id Name where Table1.TypeId is linked to Table2.Id. I've strongly generated these types by using the wizard so now I can do things like this: Table1Adapter adapter = new Table1Adapter(); Table1DataSet da...

Strongly typed datasets and schema changes

Hello, I have a project which uses strongly typed datasets. Let's assume I want to change the database schema of the database used by this application. I have a table named Country and I want to add a new column named "IsADemocracy" (that's an example) of the SQL Server datatype BIT. Now, how do I update the strongly typed dataset so ...

Typed Dataset ConstraintException on insert

Basically I have a table that contains hierarchical data. So I have an id column, and a rollup column which points to the id column for each child's parent. This table is loaded from the database using GetData() on the TableAdapter then the table's primary key autoincrementseed is set using: SELECT IDENT_CURRENT('TableName') + 1 ...

Migrating typed data sets from .net 2.0 to 3.5

I'm migrating a quite big application from .net 2.0 to 3.5 and the first challenge I'm facing is related to typed data sets. Seems that the generated code for .net 2.0 is not compatible with above versions but the built-in migration process didn't convert them so now I'm getting a lot of errors and I'm not sure what to do. Anyone know ...

Calculations on Subquery in strong typed dataset

Hello, following background: i have a Table-valued Function that returns a Table that is a kind of filtered view(views can not be parameterised) on a large table. Now i need many row count values on different conditions. Is it possible to get all count values in one query without having to query this function for every condition? For th...