VS 2010 Changing From DataAdapters/DataSets To DataSources

Nov 13, 2010

How do you control database server access when you use datasources in VB 2010?How do you access multiple tables from a store procedure using datasources?

Explanation:My experience is with VB.NET for the most part. I've written a lot of apps drawing data through dataadapters into datasets and processing them to provide reports in aspx.

I'm starting to work in VB 2010 and those elements are no longer available. What appears to be the weapon of choice is the datasource.What I'm not seeing: 2 important things that I can't work without:

1. Control over when the database server is hit with a connection request; daMyQuery.Fill (MyDataSet) was an explicit command that I could use to collect my data on demand. From that point on, I could use the dataset as I wished to populate whatever controls or structures I wished - the database server was no longer needed and wasn't hit by my apps until another pageload.

2. Multiple Tables in a query result; This must be there, I just can't find the method by which to reference different tables in my SQL output. Previous, I would have a dataadapter which would use a stored procedure to deliver a dataset of multiple - sometimes many - tables for use in the application. I can't find the equivalent on a datasource.

So my two big-ticket needs - requests for assistance, really - are listed above: How do you get at multiple tables returned from a stored procedure;and;How do you keep datasources for hitting the dbserver whenever you use it if there is no equivalent to a 'fill' method?

I guess another - how would you walk through the rows of a dataset?

View 15 Replies


Similar Messages:

SQL Reporting :: Link Multiple DataSets Then Put Data Fields From Multiple DataSets Into One Data Region?

Sep 23, 2010

How to link multiple DataSets (why SSRS call it a DataSet even there is only one bunch of data fields in it) using keys, then put data fields from multiple DataSets into one Data Region? The reason I have to do this is: There will be 6 major DataSets to be used together few times in same report, it is not make sense to build a huge Matrix for all of them together. (in some data region I use data from dataset A and B, some times I use data from dataset A and C, D ...)

View 2 Replies

VS 2010 - Changing Appearance Of Treenodes.?

Mar 7, 2011

I´m using a template from microsoft´s webdev.

I have a nested masterpage and in the childpage of the second master I have a treeview. Now I want to change appearence of the nodes in it (like the color), and I´m not able to do that. It doesn´t say anywhere if there´s a section of the css stylesheet that´s being applied.

View 6 Replies

VS 2010 - Changing Menu With Masterpage

Sep 3, 2011

When I began my first ASP.NET project, I didn't know about Masterpages, which was a pain. Because I had to manually change each and every link on all of my web pages. This was all mainly for the top menu and side menus.

But now that I'm using a master page, I think it's going to be much easier. But, I'm running into an issue.

When the user loads default.aspx, they see the following on the top menu.

Which is how I want it. But, what if they click one of the links? Before, I just updated that code to make the button of that page the active one. But, if they're all inheriting the same page, how do I commit this changes? I don't want to omit that part and manually change it on each page, because that would beat the entire purpose of doing this.

I also don't want to create another master page for each link. That would also beat the purpose.

View 7 Replies

VS 2010 - Error Changing Framework Of Windows Service

Nov 17, 2011

I have a deadline to install my windows service NOW. I developed it in VS2010 and chose the .NET 4.0 framework. The server where I am installing it, which is a server that hosts our live web sites, does not have .NET 4.0 installed. So I have to change the framework to 3.5. I have this error now when I try to build:

Error13Type System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the data at line 120, position 4 cannot be located. Line 122, position

5.C:DevprojectsDocFtpToVendorDocumentFtpProjectInstaller.resx1225DocumentFtpIt is in ProjectInstaller.resx and also Service1.resx. Is it because the version=4.0.0.0, and if so how do I change that? And if not, what is the cause?

View 9 Replies

VS 2010 - Changing Treenode Backcolor Dynamically In Code

Apr 19, 2012

What I need to do is perform some kind of decision statement and when true I need to change the backcolor of a treenode to grey, so that it has a grey box around the whole text. There is no backcolor property for the tree node and I don't need it applied all the time so I don't think a CSS class will do this.

View 4 Replies

Visual Studio :: 2010 Tab Menu Changing The Class / Style?

Apr 20, 2010

I have a trial version of VS2010 and created a simple out of the box ASP .Net web application. I have been playing around with the css file for the project and have yet to figure out how to effect the menu tabs.

View 2 Replies

SQL Server :: Changing Date Format To Dd/mm/yyyy In Sqlexpress 2010?

Aug 3, 2010

i have added to my web.config page this instruction:

<globalization culture="en-GB"></globalization>

all the dates in my web page are formated as dd/mm/yyyy but my database is still under mm/dd/yyyy is there a way to also change the format of sqlexpress to dd/mm/yyyy ?

View 3 Replies

VS 2010 - LinkButton CommandArguments Changing In Gridview Bound To Datasource

Jun 23, 2011

I have a Gridview that displays some data I am pulling from a SQL Server database. The stored procedure that runs the query accepts a table valued parameter. I am unable to find a way to pass this structure to an asp:SQLDatasource so I have been manually creating the datatable and then binding my Gridview to it. The DataType I am using in the code-behind to pass into the stored procedure is a System.Data.SqlDbType.Structured type.

Each Gridview row has an asp:LinkButton with a CommandArgument value that looks like

<%# Eval("PartNumber").ToString() + "|" + Eval("ID").ToString() %>

Each LinkButton calls back to a function in my code behind that accepts the CommandArgs, does some work, and redirects the user to another page.

Since I am manually binding the Gridview to the Datasource when the number of records exceeds my paging size and the user changes pages or sorts the Gridview, the CommandArgument value changes to the wrong row and I get bad data back from the CommandArgument. how to pass a System.Data.SqlDbType.Structured type into an asp:SQLDataSource but if that is not possible how I can work around this?

View 5 Replies

VS 2010 / Changing Label Text From Page Load Does Not Work

Nov 22, 2013

I have a label on my page, and in Page_Load I have

Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = "dog"
End Sub

This works when I run it locally, but not when I upload it to my host. The label does not change. what is going on?

View 2 Replies

Dropdownlist - Multiple Datasources?

Mar 21, 2011

problem: bad design but this is what they want.I have a datasource which binds to a dropdownlist. This is fine. this displays companies (with companyID as the DataValueField)they then, underneath, want a seperator and then after that, a list of "groups".of course, DDL cannot have multiple Datasources. So how can I bind from 2 sources into 1 DDL? I cannot seem to think of a way. Even adding the items at the end of the databinding will not help as the GroupID maybe the same as a CompanyID for the DataValue.

View 4 Replies

Overwriting ControlParameters Of DataSources In Code-behind?

Mar 8, 2010

I have an ObjectDataSource (but perhaps this question is the same for all kinds of DataSources which support parameter collections):

<asp:ObjectDataSource ID="MyObjectDataSource" runat="server"
TypeName="MyData"
OldValuesParameterFormatString="original_{0}"
SelectMethod="GetMyData" >
<SelectParameters>
<asp:ControlParameter ControlID="MyTextBox" Name="MyParameter" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>

As you can see there is a ControlParameter bound to a TextBox on the aspx page. So the content of this TextBox is a parameter for my SelectMethod. But there is a special button on the page: When this button is clicked and a postback occurs I don't want that the DataSource extracts the content of the TextBox to control the selection, instead I want to set a specific hard value "x" as the selection parameter.

How can I do that? Can I "disable" in some way the ControlParameter when this specific button is clicked and set my special value instead? Or is there any other way?

View 1 Replies

Web Forms :: Controls In Gridview EditItemTemplate Not Available In CodeBehind Or DataSources?

Feb 16, 2010

i saw this post on[URL] so the problem is .... if there is a datasource in some editeitem template in grid view .... it won't be accessible from out of the edit-item field.....

here's my code...

[Code]....

that i have here is ID-column which contains a linqdatasource taking a where parameter from a dropdownlist and they are both in the same edit-template field.

and i have in another column (CourseTypeID-column ... edit-item template) a dropdownlist ..... now this dropdownlist i want to bind it to the linqdatasource exists in the ID-column (edit-item template)..... is that possible in the designer (or from) not code behind ..... and how ????

View 4 Replies

Forms Data Controls :: How To Use Multiple Datasources In One Gridview

Feb 26, 2010

I have one grid in which i use one datasource to get several data . Now i want to ad a column in my grid and bind that column with a column from another datasource.

View 9 Replies

Forms Data Controls :: Filtering GridView Without Datasources?

Mar 29, 2011

I've been filtering my gridviews with the FilterExpression of the underlying ObjectDataSource etc. I am wondering how I can implement filtering on my GridViews if I just directly databind it to a datatable etc?

View 5 Replies

SQL Reporting :: Programmatically Setting Report Viewer Datasources?

Dec 22, 2010

I have created a web application will will eventually be the holding place for several reports. Rather than creating a new webform for each report, I want to use the same report viewer for all of the reports. I have created an AccountSummary dataset (AccountSummaryDS.xsd) that has two tables, one for the header information and one for the details. I have two webforms in the app, a Default.aspx that captures the necessary employee information for the query and the ReportForm.aspx that has the reportviewer control.

I came up with the code below for a Windows form application but am having issues translating it to be used in a webform.

[Code]....

View 1 Replies

DataSource Controls :: Link 2 Datasources In Data Model?

Mar 15, 2010

i have a mysql database and a sql server database.there is a link between these two tables via a foreign key.is it possible to connect two datasources together in my datamodel? if so please can someone tell me how i can do this? i have them both present in the data model, i just want to be able to link the two databases together.i am using asp.net mvc, c# and entity framework - all in visual studio 2008

View 4 Replies

Architecture :: Searching Over 2 Datasources - Result Is Query Parameter For Second Search

May 3, 2010

I would like a site that offers the users the possibility to search over 2 datasources but as i tried to indicate in the subject title the searches are one after another where the result of search 1 is used as a parameter for searching the second datasource. The order of the search would depend for what you search (ideally). Some "fields" or "data" of course appear in both datasources.

To get more specific: datasource 1 contains chemical structures and the associated "id" for this structure + additonal properties. You can search for chemical structures here. (chemically intelligent system). datasource 2 contains documents which are indexed (full text) and have metadata fields one of them beeing above id. No chemical search possible.

The idea is now that i perform a search by chemical structure on datasource 1. As as a result I get a list of id's. These id's are then past into datasource 2 as parameter + also all additionaly parameters entered. There are API's available to perform above searches on the 2 datasources. Is this a reasonable approach? Would it be better to create somekind of a simple datawarehouse, eg a table with all numbers linked to all documents they appear in? (would't know how to achievie this actually since it's the 2 datasoruces are not the same rdbms).

View 2 Replies

Forms Data Controls :: Bind Two Datasources To One Dropdown List?

Jan 7, 2010

Is it possible to bind two separated datasources to one dropdown list such that they are both alphabetically sorted and seprated by some sort of line. I know there is a way to insert elemets manually, but I'm not sure of the 2 separate datasources. I've serached this forum and while there were several posts none of them offered any workable solution.

View 5 Replies

How To Write Datasets To Xml

Nov 17, 2010

I have just started learning asp.net with c# and want to know how to write datasets to XML using asp.net.

Can anyone provide me any example or reference so that I can move ahead.

View 2 Replies

ADO.NET :: Compare Two Datasets?

Nov 13, 2010

I have two datasets, each of containing single column. I want to compare each row of first dataset with each row of second dataset and check if any match in the data.How can i implement such a login in VB.NET with minimum iterations.

View 2 Replies

Merging Two Datasets Into One Grid?

Mar 20, 2010

I have two datasets called ds and ds1 that I want to merge into a grid. I get data from the first dataset to display in the grid but the second dataset where I want to display a count I don't get any data from it. I am trying a ds.Merge(ds1). here is the code i have for the sub. What am I doing incorrectly?

Code:

[code]....

View 9 Replies

C# - How To Stay Away From DataSets, And What Are The Alternatives

Jan 25, 2010

I found an interesting discussion here:

[URL]

Quote:

DataSets are sub-par amateur solutions to code your Data layer...Stop Using Them and learn to CODE! :)

What is your opinion of DataSets vs. just stubbing out custom classes and working with those? What are other alternatives?

View 3 Replies

ADO.NET :: Creating DataSets On Application_State?

Feb 5, 2011

I have a good bit of data that is generally static. I want to load it into my application so I can access the items from picklists without having to make redundant calls to the database. I have found a few articles discussing how I can approach this, but, I am specifically looking for a way to create a collection of DataSets with constraints at Application_Start. Also, when you do this kind of thing, do you normally create one dataset or a separate dataset per table? I know there are ways to add multiple tables to a single dataset, but, I don't know how to do this from the DataSet Designer.

View 2 Replies

ASP C# | Importing CSV With DataSets & DataTableAdapters?

Aug 26, 2010

I have imports.aspx with an ASP:FileUpload function.In my code-behind I have this:

SEPTA_DSTableAdapters.ServiceTBLTableAdapter sta = new SEPTA_DSTableAdapters.ServiceTBLTableAdapter();
SEPTA_DSTableAdapters.RoutesTBLTableAdapter rta = new SEPTA_DSTableAdapters.RoutesTBLTableAdapter();
protected void Page_Load(object sender, EventArgs e)

[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved