Hi,
Please see the code below. What I am trying to do is to store some PDF file names in XML format inside a database 'PDF_Storage' field. The code kind of works but is not polished enough: If there is no data for a row then I am putting a hard-coded xml file and then manipulating (Uploading new PDF; Deleting PDF) using a GridView contro...
I'm trying to add a query to my dataset and getting an error "Must declare the scalar variable @searchstr". I find this a little odd because I've used the @variable to pass parameters before no problem, but for whatever reason it fails here.
select DISTINCT g.groupname,
CASE WHEN s.siteguid = @searchstr THEN 1 ELSE 0 END AS doesitexis...
I don't use DataSets much. Usually find myself using an ORM or just a basic sqlReader.Read() followed by some GetValues(). I'm working on some legacy code that has DataSets all over the place, and while fixing a bug was trying to DRY some of it up.
However, I can't seem to actually get the data loaded into a non-typed DataSet.
publ...
Hello,
I've been reading updates on Data Sets vs. Other ORM's like ADO.NET Entity Framework, but a lot of them refer to the older version, so with EF 4 as an option today, what is people's opinion for data sets vs. EF 4, which is better, worse?
I like EF 4 because:
The designer finally works well.
The variation of model options (POC...
What is a good source for datasets that can be used to train machine learning algorithms, specifically image sets for computer vision projects.
The best source I've found so far is: http://archive.ics.uci.edu/ml/index.html
...
Hello,
I have a Dataset that contains tables from a university database,
two(actually more) of these tables contain a many to many relationship,
specifically I have a,
Students table (Contains information about students)
Courses table (Contains information about the courses)
TakesCourses table (Which is an intermediary table between th...
Hello, Everyone!
I am currently struggling with MySQL database with DataSet. The thing is that it uses loads of memory(as I found somewhere over the net it uses almost 4x memory rather than when you are using DataReader).
What I was thinking is to make a function that will use DataReader for the SQL SELECT command.
What I am currently t...
I have created a strongly typed dataset in the VS 2005 Dataset Designer.
There are two tables that relates to each other in a one to many relationship: Claim and ClaimDetail. The designer automatically creates a function GetClaimDetailRows which returns all ClaimDetailRows for a ClaimRow. Why is this Array's length always 0?
Because Cl...
I am trying to find some working examples to learn the wonders on Dataset with XML. Im using this example of the xml data. I want to search through all the CD nodes for the TITLE value.
DataSet dsXml = new DataSet();
dsXml.ReadXml(msXml);
...
I have an xml file that is a project resource. I can access it via Properties.Resources.DrivereSettings. The xml file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<FilterOffsets>
<FocusOffset>
<SerialNumber>12543</SerialNumber>
<Filter>4</Filter>
<Wheel>A</Wheel>
<Offset>7</Offset>
</FocusOffset>
</Filte...
I get the error "Table doesn't have a primary key." so how do I set the primary keys, does it not do this when I call ReadXml() or have a missed a arg out??
MemoryStream msXml = new MemoryStream(byteArray);
DataSet dsXml = new DataSet();
dsXml.ReadXml(msXml);
string s = "123456789";
DataRow foundRow = dsXml.Tables["Accounts"].Rows...
Hi
Could anybody help me for avoiding this issue. My issue is that i have one dataset that populates some values like value1, value2, value3, value1, value3, etc. And i am showing this values in a dropdown list. But my requirement is that i have to show the same value once. That is the dropdown should be display like this, value1, value...
I have a project where I need to pull in a lot of records and modify them based on some criteria.
Basically, we have a system where users can upload documents. Those documents get tagged in the database for validation reasons from other users. We validate the files based on certain criteria and then mark them as being valid. So we have...
In my current solution, I am converting a DateTime value, "Time" in my database using CONVERT so it displays in a ##:##AM/PM format, and I realize that CONVERT just takes whatever datatype and turns it into a VarChar, or a String once its in C#. This is making my sort work incorrectly in my Gridview. I am sorting the columns in my DataSe...
I created a strongly-typed dataset in the dataset designer. The DataSet has a Table called FocusOffsetsTable and that table has four colums; SerialNumber, Filter, Wheel and Offset. I use the ReadXml() method of the DataSet class to load the strongly typed data from the xml file into the dataset. That seems to be working just fine.
I am ...
Hello all,
I'm trying to use Dataset.WriteXml() function in VB.Net to generate an XML file with Pretty-Print Layout (I think this is how it's named) like the example below (Listing 1):
<MainRoot>
<Table1>
<Col1>Value1</Col1>
<Col2>Value2</Col2>
<Col3></Col3>
<Col4>Value4</Col4>
</Table1>
<Table2>
...
Hello all,
I'm trying to use Dataset.WriteXml() function in VB.Net to generate an XML file with Pretty-Print Layout (I think this is how it's named) like the example below (Listing 1):
<MainRoot>
<Table1>
<Col1>Value1</Col1>
<Col2>Value2</Col2>
<Col3></Col3>
<Col4>Value4</Col4>
</Table1>
<Table2>
...
The goal is to populate a dataset from XML, sort one of the DataTables, and then write out the sorted DataSet back to XML.
I can't seem to sort my DataSet and have tried a few variations. It adds the data fine but does not sort. Hope someone could help to stop me pulling my hair out.
DataSet dsXml = new DataSet();
dsXml.ReadXml(msXml);...
What changes do i need to make so as to reduce of doing this task with fewer lines and better approach.
DataTable dtStatusMsgs;
var statusList = (
from items in dtInputTable.AsEnumerable()
where items.Field<int>("DepartmentId") == deptId
select new
{
...
Hi!
My application uses a badly arranged Excel spreadsheet as a data source. I say badly designed because there's no unique identifier to each row aside from the column where dates and times are found.
Long story short, my app uses the date and time on each row as an identifier to retrieve information from the other columns in the row....