To Use A Dataset Or Not...

ok, i have a question.

im developing an application, and want to know some pro's and con's with using a dataset or using direct connection to database...

also a breif description of what a dataset is would be very handy...

Thanks, Justin


How Can I Use SQL Reporting Services To Get A Dynamic Dataset From Another Web Service As My Reports Dataset?

I found out the data I need for my SQL Report is already defined in a dynamic dataset on another web service.  Is there a way to use web services to call another web service to get the dataset I need to generate a report?  Examples would help if you have any, thanks for looking

View Replies View Related

Listing Datasets In Report (dataset Name, Dataset's Commands)


Is there any way to display this information in the report?

View Replies View Related

Dataset.Tables.Count=0 Where There Are 2 Rows In The Dataset.

I have a stored procedure attached below. It returns 2 rows in the SQL Management studio when I execute      MyStorProc 0,28. But in my program which uses ADOHelper, it returns a dataset with tables.count=0.
if I comment out the line  --If @Status = 0 then it returns the rows. Obviously it does not stop in
if @Status=0 even if I pass @status=0. What am I doing wrong?
Any help is appreciated.

ALTER PROCEDURE [dbo].[MyStorProc]


@Status smallint,

@RowCount int = NULL,

@FacilityId numeric(10,0) = NULL,

@QueueID numeric (10,0)= NULL,

@VendorId numeric(10, 0) = NULL






If @Status = 0


  SELECT ......
If @Status = 1

View Replies View Related

How To Transfer Data From One Dataset To Other Dataset

i have two dataset have old data from some other database.second dataset have original data from sql server 2005 database.both database have same field having id as a primary key.i want to transfer all the data from first dataset to new dataset retaining the previous data but if old dataset have the same id(primary key) as in the new one then that row will not transfer.
but if the id(primary key) have changed values then the fields updated with that can i do that.

View Replies View Related

Filter One One Dataset With Values In Another Dataset?


I have two datasets in my report, D1 and D2.

D1 is a list of classes with classid and title

D2 is a list of data. each row in D2 has a classid. D2 may or may not have all the classids in D1. all classids in D2 must be in D1.

I want to show fields in D2 and group the data with classids in D1 and show every group as a seperate table. If no data in D2 is available for a classid, It shows a empty table.

Is there any way to do this in RS2005?

View Replies View Related

Create A New Dataset From Dataset


Here's what I'm trying to acomplish, I have an OLE DB Source that reads a table; for each record in the table I need to run a SQL Command that retrieves information from another set of tables based upon the input data; then I would like to iterate through that resulting dataset from the SQL Command and perform another SQL Command updating the database.  Here's what I've tried: OLE DB Source to OLE DB Command, however I can't view the output of the command.  Any help will be much appreciated.



View Replies View Related

Using Parameter From XML DataSet In Another XML DataSet

Hi every body...
I have a probleme
I have a web Services which contains a method getValue(IDEq (int), idIndicator(int), startTime(dateTime), endTime(dateTime))
I need to call this method. But my problem is how pass parameter ?
I see the tab Param but it isn't work as I wait,... maybe I do a mistake...

I want that statTime and endTime are select by the user via a calendar for example...
now idIndicator and idEq was result of an other dataSet from a xml datasource...

But I don't how integrate dynamically... I try to enter a parameter via the param tab, and create and expression :
=First(Fields!idEq.Value, "EquipmentDataSet")
but when i execute the query, the promter display <NULL>...
So I don't know how to do and if it is possible !
I hope someone can help me !
Thank you !

View Replies View Related

Dynamic Dataset For Another Dataset!

Hi experts,
I'm not sure my design is normal or not.  Please give me some advice.
I've a dataset and query by a field name 'companyid'.
select * from companyid where companyid = @icompany which @icompany is a input field.

if user select all, i'll send 0 to @icompany then I need to select all records.
question 1.  How can I get all records? (i think about this query select * from companyid <> 0)
if user select for example companyid = 1, i'll send 1 to @icompany and the query work fine.
question 2.  How can I change the query to adopt this 2 condition?
Thanks a lot,

View Replies View Related

Regarding Dataset

I using a stored procedure to update profile...

-- =============================================
-- Author:
-- Create date:
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[SP_UpdateProfile]
-- Add the parameters for the stored procedure here
@regUserID nvarchar(20),
@regName nvarchar(50),
@regEmail nvarchar(50),
@regMobile nvarchar(10),
@regPinCode nvarchar(10),
@regCity nvarchar(12),
@regState nvarchar(12),
@RValue int output
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.

-- Insert statements for procedure here
UPDATE tblUserDetails
regName= @regName,
regEmail= @regEmail,
regMobile= @regMobile,
regPinCode= @regPinCode,
regCity= @regCity,
regState= @regState
WHERE regUserID=@regUserID

here i updating the profile according to the userID..

My doubt is how to get these various values selected in a dataset and how to retrieve from tat dataset... please friends help me out...

View Replies View Related

Regarding Dataset

I am using storedprocedure for a process... i am selecting 4 variables from the stored procedure as a ouput parameters.. now please help me in working with a dataset to collect the 4 variables and read the variables from the dataset...

View Replies View Related

How To Do This With Dataset

hi developers
    i've a table named users where i store the city id ,
this city id -> citymaster (cityid,stateid)->state master (cityid,stateid) ->country master (countryid,stateid).
now i need to make the query fetches the columns like this
how can i do this

View Replies View Related

XML To DataSet To SQL

I am faced with a common situation but there is a little twist that makes it unique and has me stumped. Hopefully someone can point me to a solution or give me enough guidance to figure it out.
Here is the situation, I am loading an XML file into a Dataset and need to update SQL tables from that Dataset but the tables are slightly different than in the DataSet. I am using C#, 2.0, visual studio 2005 and sql server 2005.
When I loaded the XML into the Dataset, the Dataset contained 19 tables. I individually loaded each table from the Dataset and determined from that which tables I needed and didn't need as well as determinined which fields I needed or not. I used this information to create my SQL tables.
Briefly, when creating the SQL tables, I used the dataset table name as the SQL table name and used the same column names as well. the only difference from the Dataset tables and SQL tables is 1 column has a different name (or to be more specific, a column exists in the datset that does not exist in the sql table and a column exists in the SQL table that does not exist in the dataset table). Also, some tables in the dataset do not exist in the sql Database.
I know that I can spin through each row of the tables I need in the Dataset and create an insert command from the row data and insert that into the SQL table but I have 11 tables to do that with. I would like to take advantage  of ADO.NET and push the datset information into sql data but I am confused on how to do this.
I am confused because not all tables in the dataset are represented in the sql database and though the tablenames and most of the columns have the same name, it is not an exact fit.
Can anyone point me to a solution or give me a good game plan that I can search on to help me load my dataset info to a sql DB.
I appreciate any help I can get.

View Replies View Related

Dataset To Sql

Is there anyway to just add a dataset created from a query to a table in sql
without looping through the records individually and placeing the records in the database
Maybe a sort of mass import option

View Replies View Related

Using Only One Dataset


I am using the following stored procedure, but as it is now it returns 2 datasets. I need it to return only 1.

@Location varchar(250),
@FromDate datetime,
@ToDate datetime


CREATE TABLE #Temp1 (themonth varchar(12), theyear varchar(12), averagedaystofilltotal float, averagefillratetotal float,
delaytimetotal float, responsetimelagtotal float)

INSERT INTO #Temp1(themonth, theyear, averagedaystofilltotal, averagefillratetotal, delaytimetotal, responsetimelagtotal)
EXEC rptStatsGraphicalYEARoverYear @Location, @FromDate, @ToDate

Create table #Temp2(averagedaystofilltarget float, averagefillratetarget float, responsetimelagtarget float)
INSERT INTO #Temp2(averagedaystofilltarget, averagefillratetarget, responsetimelagtarget)
EXEC Test1

Select * from #Temp2

drop table #Temp1
drop table #Temp2

Would anyone have any suggestions on how to modify this procedure so that it returns only one dataset, but yet still keeps the data seperated? Or is this even possible?


View Replies View Related

Use Dataset

i m working on ERP with VB.Net and SQLserver2005.
i have some problem with that query.
In the here is two administrator
1- administrator
2-HR administrator
in the table,code written on login srceen and query is following.
SELECT userGroupMaster.groupName FROM userGroupDetails INNER JOIN userGroupMaster ON userGroupDetails.groupName = userGroupMaster.groupName INNER JOIN UserNameMaster ON userGroupDetails.userName = UserNameMaster.UserName WHERE (UserNameMaster.UserName = '" & gl_strUserName & "')
whenever i execute it then error comes due two administrator.

I wanna use dataset in that query to read first administrator.


View Replies View Related

How To Use Dataset?

i am having a stored procedure and i want to use dataset to retrieve the first row of my table.

View Replies View Related

What's In A Dataset Name?

I have come into a company where my predesessor used a TON of differently named RDS files to connect to the same SQL Server Database; the same connection string, login id, etc.  My suspicion is that he thought that datasources were the same as datasets and created one for each.  I can't find a difference in any of them; except their name.

Is there any good reason to do this? 

Should they all have been changed to be something generic like "ConnectTo{servername}Production.RDS  (instead of {Report Name}.RDS)???   What is the easyiest way to change them all to the same RDS file?

Any thoughts?


View Replies View Related

Get Second Dataset Value


how do I get value from second dataset (in multi dataset report)

in some function it provide scope parameter like

Sum(Fields!amount.Value, "DS2")

but now I need to show the value without using function





View Replies View Related

XML Dataset

For some reason a report runs but when we try to run in the datset window we are getting this error. I need to add another field to a dataset in a preexisting report but we can't get the dataset windows to run. It seems like its a problem with one of our date parameters. Any suggestions would be very helpful.


<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd=""><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server was unable to read request. ---&gt; There is an error in XML document (9, 42). ---&gt; The string '1/1/2006' is not a valid AllXsd value.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>


View Replies View Related


Hi everybody!
Can we have more than one DataSet in one list?
Thanks for your help!

View Replies View Related

Using Dataset(on 2nd)


Hi all,
If i have dataset in Dotnet Code,Can i use that dataset to report design?
Any body know.

View Replies View Related

Dataset WHERE Clause

I've created quite a complicated Dataset to enable users to search for names in a database.
Is there a way I could modify the WHERE clause without having to rebuild the Dataset each time?
I'd like to support general search criteria ie.
1) quotes, so WHERE NameSearch LIKE '%FirstName Surname%'
2) unlimited multiple keywords, so WHERE (NameSearch LIKE '%FirstName%' ) AND (NameSearch LIKE '%NickName%')
The query has already been built (and tested), so the problem is only with generating the WHERE clause, particularly when I'm not sure how many keywords are involved.
Any help would be greatly appreciated.
Thanks, Pete.

View Replies View Related

SqlDataAdapter And DataSet

I'm getting a strange error with my dataadapter.  Here's my code:  using (SqlConnection conn = new SqlConnection(
SqlDataAdapter da = new SqlDataAdapter("sprocCUSTOM", conn);
da.SelectCommand.Parameters.AddWithValue("@eventID", EventID);

conn.Open(); //open connection
DataSet ds = new DataSet();
gvAttendees.DataSource = ds;
}This is the error I'm getting: Incorrect syntax near 'sprocCUSTOM'.But the error is highlighted at the line that reads "da.Fill(ds);"There's nothing wrong with the stored procedure either.  It exists and works fine. 

View Replies View Related

DataSet To SqlDataSource

I can find lots of examples of how to extract a DataSet from a SqlDataSource, but not the opposite.
I have a DataSet that has been populated with 3 DataTables, and I want to create a SqlDataSource, and populate it with the first DataTable in the DataSet.
Is this possible?

View Replies View Related

How To Push A Dataset Into The DB?

Dear all,,
I used a code that import data from an excel file into a dataset,
 now I want to insert the dataset into a table in my database(SQLserver database) using a VB.NET code
Could you help me?
Thanks in advance,,
Here is my code:
Imports System.Data.OleDbPartial Class _DefaultInherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.ClickDim connString As String = ConfigurationManager.ConnectionStrings("xls").ConnectionString
' Create the connection object Dim oledbConn As OleDbConnection = New OleDbConnection(connString)
' Open connection
' Create OleDbCommand object and select data from worksheet Sheet1Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn)
' Create new OleDbDataAdapter Dim oleda As OleDbDataAdapter = New OleDbDataAdapter()
oleda.SelectCommand = cmd
' Create a DataSet which will hold the data extracted from the worksheet.Dim ds As Data.DataSet = New Data.DataSet()
' Fill the DataSet from the data extracted from the worksheet.oleda.Fill(ds, "Sheet1")
' Bind the data to the GridView
GridView1.DataSource = ds.Tables(0).DefaultView
' Close connection
End TryEnd Sub
End Class

View Replies View Related

My SQL Dataset Will Not Work!

For the life of me, I cant get this thing to work.. any insight would be greatly appreciated. What I'm trying to do is simply get the RealName field from my aspnetdb.Here the code.           SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=aspnetdb;Integrated Security=SSPI");                    SqlDataAdapter a = new SqlDataAdapter                    ("select RealName from dbo.aspnet_Users where UserName='Dude';", conn);                    DataSet s = new DataSet();                    a.Fill(s);                    foreach (DataRow dr in s.Tables[0].Rows)                    {                    getusersrealname.Text = (dr[0].ToString()); 

View Replies View Related

Can I Select * From DataSet?

I used codes below:
sqlA = "select * from order where orderby = 'Mike'"
myDataset = makeDataset(sqlA) // I created a function to return a dataset
I knew the code below is working:
select * from Product where OrderID in ( "select * from order where orderby = 'Mike'")
Can I do the way below?
select * from Product where OrderID in myDataset

View Replies View Related

How To Get A Count From A Dataset?

I'm using strongly typed datasets.  Not I want to get a single number, say the number of males, instead of a table or rows.  How can I do that?Diane 

View Replies View Related

Problem With Dataset()

Hello all
i m facing a problem " There is already an open DataReader associated with this Command which must be closed first."
what is this alll the another page like thispage is currently working properly
so what is this problem
pleasse help me

View Replies View Related

Creating A Dataset

Im trying to complete my function which will allow me to insert data into a table by referencing it in the relevant pages, the following code is what i am using to take the SQL query, execute it and return the resultant dataset in destResponse. However i am getting the following error message; "Compiler Error Message: CS1026: ) expected". And it is coming from the following line;
SqlCommand command = new SqlCommand("INSERT INTO" + strTableName + strData +") VALUES (" + strData + ")";
 Here is my code below, please feel free to criticise it, and im sure the error above is not the only error i will be getting.
 public static void SQLExecute(string strTableName, string strData)
{DataSet dsetResponse = new DataSet();
// create connection objectstrConnection = ConfigurationManager.AppSettings["strConnectionString"];
SqlConnection conn = new SqlConnection(strConnection);SqlCommand command = new SqlCommand("INSERT INTO" + strTableName + strData +") VALUES (" + strData + ")";command.Fill(dsetResponse,"table");
conn.Close();return dsetResponse;

View Replies View Related

Dataset Blues

i don't know if this is the right forum for this question but here goes.  I have created a gridview to display a list of records retrieved by a SQL query.  Everytime I run it, I get the following error:
Object must implement IConvertible.
I thought it might have to do with the data I'm passing in the session string from the previous page.  Here is that code:Protected Sub cmdSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
Session.Add("Shift", shShift.SelectedItem)Session.Add("Type", shType.SelectedItem)
Session.Add("SelDate", OccDate.SelectedDate)
Here is the code that is supposed to execute and display the data on page_init:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="RID" DataSourceID="SqlDataSource1" Width="1215px" BorderStyle="Groove" BorderWidth="4px">
<asp:BoundField DataField="RID" HeaderText="Record ID:" InsertVisible="False" ReadOnly="True"
SortExpression="RID" />
<asp:BoundField DataField="Date" HeaderText="Date:" SortExpression="Date" />
<asp:BoundField DataField="Shift_ID" HeaderText="Shift:" SortExpression="Shift_ID" />
<asp:BoundField DataField="Xref_ID" HeaderText="Type Of Occurence:" SortExpression="Xref_ID" />
<asp:BoundField DataField="Notes" HeaderText="Notes:" SortExpression="Notes" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PerfDataConnectionString %>"
SelectCommand="SELECT [RID], [Notes], [Date], [Shift_ID], [Xref_ID] FROM [Safety_data] WHERE (([Shift_ID] = @Shift_ID) AND ([Xref_ID] = @Xref_ID) AND ([Date] = @Date))">
<asp:SessionParameter Name="Shift_ID" SessionField="Shift_ID" Type="Int32" />
<asp:SessionParameter Name="Xref_ID" SessionField="Type" Type="Int32" />
<asp:SessionParameter Name="Date" SessionField="Date" Type="DateTime" />
What could be causing the issue?

View Replies View Related

Copyrights 2005-15, All rights reserved