DataSource Controls :: Having To Detach SQL Database After Changing And SQLdatasource In Design View?

May 14, 2010

everytime I modify an SQLdatasource using VS wizards, I have to dettach the mdf in VS's server exporer, then hit refresh in the browser, then get the applicaiton is offline error message please remove some pia file, but i usually just count to 12 and then hit refresh again and the page renders properlyhad scoured the forum on more than one ocasstiion, think it has something to do with the Admin rights within SQL, Ive tried the SQL server surface configuration tool, and add administrator stuff, but not sure if i should add (user to provision) something like the asp.net thing, or network services or ??also cant figure out where to view which administrators are actually on SQL server,

View 4 Replies


Similar Messages:

DataSource Controls :: Database Design - Display Results On A Web Page Via The Grid View

Mar 10, 2010

Not sure if this is for SQL or .net! I have 3 tables which looks like

table1
ID Name
1 Jon

and

table2
ID Number Job
1 1 IT
2 1 Web
3 1 Admin

table1
ID ContractType
1 Temp
1 Perm

An inner join makes one table with 3 rows (I excluding the ID from table 2 for the join) which is saved as a view

viewTable
ID Name Number Job ContractType
1 Jon 1 IT Temp
2 Jon 1 Web Temp
3 Jon 1 Admin Temp
4 Jon 1 IT Perm
5 Jon 1 Web Perm
6 Jon 1 Admin Perm

I want to display these results on a web page via the grid view. However, I don't want to show the user 6 times! I want to show the user name once, the contract type once and each Job! What is the best way to do this? Is there a fault with the database design already? I assume the easiest answer is to not join them in a view but query each section 3 times from the website but I'd rather 1 connection only!

View 10 Replies

DataSource Controls :: Dynamically Changing SqlDataSource.SelectCommand From FormView.ModeChanged?

Nov 17, 2010

In an asp.net 3.5 web app, I have a page with the following markup/code (this is the brief version, but I believe I got all the relevant info).

[Code]....

The form contains 2 different record types, accessed using the paging controls, depending on the ParentSR field; a parent SR will be something like '1234' while its sub-record will be something like '1234.1'. There are only a few differences in the fields used between the 2 different record types and that is why they are stored in the same table. However, the activity depends on the record type. When browsing from the parent record to the sub-record, the itemtemplate loads fine (notice in the formview's datasource
query, that the sractivity_id field is being pulled along with the subquery value). But when going to edit the record, the page throws an error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: 'ddlActivity' has a SelectedValue which is invalid because it does not exist in the list of items.

If i click 'back' and retry, it may take 3 attempts, but then the edittemplate will load just fine. I should also point out that this error does not always occur. I've been trying to figure this out for a couple months and it is driving me nuts, mainly due to the fact that I can't reproduce the error in development--it seems to only occurr in production. Anyone with any thoughts on what is going on?

View 1 Replies

DataSource Controls :: Detach Objects In Linq To Sql?

Apr 5, 2010

Entity framework easily allows for this but how can I detach objects in linq to sql?

View 1 Replies

DataSource Controls :: Update Database Using Sqldatasource?

Jan 14, 2010

i am using a gridview which shows the data and a select column. when the user selects a record a detailsview is shown with the respective details and an edit button inside it. when the user clicks on the edit button the entire detailsview becomes editable and the user can now edit the selected record .here the problem starts cause when the user clicks on the update button there is an error stating that illegal variable/number or parameter not found.i am using sqldatasource to bind the gridview and detailsview with an unique RequestId fieldwhich detailsview sql datasource uses to bind the record uniquely.

View 3 Replies

DataSource Controls :: Database Design Tip Required?

Jun 4, 2010

I am building a page that displays a product's details, with the information being called from an MSSQL database.I would like to be able to have a variable number of features listed for each product, so for example, Product A has a list of 3 features, Product B has a list of 7 features, Product C has 2 features listed etc.I would like to avoid having a lot of NULLS in my database, and would prefer not to restrict the number of possible features listed.Is there a common way to tackle this problem? Is it simply a case of setting up a table just to store features?

View 2 Replies

DataSource Controls :: Search Database For Names Beginning With A Thru C......SQLDATASOURCE?

Jun 25, 2010

I have a mssql table of names. This table contains names from A thru Z. However, I want to be able to display names by their beginning alphabet...Like first Display names A thru CThen Display Names D thru F
and ..so on....and so forth....thru ZI using asp.net and have a grid view with paging enabled.....

View 2 Replies

DataSource Controls :: SqlDataSource Query Not Using Index On Database Table?

Jan 20, 2011

I have this sqldatasource:

<asp:sqldatasource id="SqlDataSourceX" runat="server" connectionstring="<%$ ConnectionStrings:MyConn%>" providername="System.Data.SqlClient"
selectcommand="SELECT ItemNum, MIN(DateAdded) as [DateAdded]
FROM Items WITH (NOLOCK)
WHERE [DateAdded] between @DateFrom AND @DateTo

[Code]....

When I call select in codebehind, after 30sec it throws timeout expired SqlException:

[Code]....

again , this select took up to 3 sec to be executed. In application I tried to use SqlConnection and SqlTableAdapter instead of SqlDataSource, with the same query, and again it took up to 3 sec.

If I choose tighter interval (e.g '2011-01-20 00:00:00' - '2011-01-21 00:00:00') , there is no timeout exception, so I know that sqldatasource select is executed correctly. So the conclusion is that sql server is not using index while executing query sent from sqldatasource, but is using index whenever else. I have also checked the index statistics on sql server and it is like that. In profiler i can see slight difference between this two cases. As for SqlDataSource, in events table, in first column "EventClass" after 30 sec, there is this: "RPC:Completed" and application throws timeout. If i use SqlConnection and SqlTableAdapter then at the same place there is this: "SQL:BatchStarting" and "SQL:BatchCompleted" and application does not throws timeout(the index has been used).

what is so special on SqlDataSource connection, that Sql Server performs differently compared to other types of connections?

View 3 Replies

DataSource Controls :: How To Create A LINQ DataContext Class As Per Database Design

May 5, 2010

I want to create a LINQ DataContext Class as per Database Design. I getting a problem in some cases.

the syntax to bulid a LINQ class :

[Code]....

Here Table Name Is HardCoded But I my case my Table Name A Changed as Finicial Year Change.So How I Give The TableName As RunTime

View 8 Replies

DataSource Controls :: Using Textbox Controls To Update Database With SqlDataSource?

Jan 11, 2010

I have this working on another project I have but cannot figure out why I can't get it to work on another. I have a dropdownlist box with employee names. When an employee is selected, I display the data (address, phone, email, etc.) in a series of textboxes. User can make changes and then click on an "Update" button where I attempt to update the database with the changes using the sqldatasource. The code works without any errors, but the database does not update.

Here's the sqldatasource code (the code behind follows):

[Code]....

Code Behind for the "Update" button control which was intended to update the database with sqldatasource3.update() command at the end:

[Code]....

View 14 Replies

DataSource Controls :: DetailsView Edit Options After Changing Database

Sep 13, 2010

I had a DetailsView control for editing records in a Access 2003 database. I transfered the database to MS SQL 2008 and using the same code does not work - after clicking edit nothing happens (no error) and the record is not updated.

[Code]....

View 3 Replies

Visual Studio :: Switching To Design View - Unable To See Design View?

Jan 5, 2010

in my project the design view is not viewed, but the project is working well and good .. the only issue is i cant see my design view ..

error stated is ""Cannot switch views: Validation (Internet Explorer 6): Element 'Style' cannot be nested within element 'td'.""

View 2 Replies

DataSource Controls :: Table / Database Design Theory - Return Faster Queries

Feb 5, 2010

In general terms, which way will require more server processing power and which way will return faster queries... if there is even a difference. The client's database is still on the dev MS SQL server but is essentially but the client has decided they want to collect two more fields of information. Both fields are going to be collection text data and probably varchar(300) will be sufficient for the column data types. Would it ultimately be more efficient to

Add two additional columns in the main table so the data is entered directly into each record, or Add an additional table (or two) with a foriegn key to the primary table that holds the info for each new field The SELECT statement for the main table could be modified to either add the new columns (a.NewColumn1 and a.NewColumn2) or it could contain nested SELECT statements that pull in the data from the other tables. Custom daisy-chained Insert or Update statements would be no problem and a cascade Delete relationship would take care of any deletions. I'm just trying to figure out which would be better from a performance standpoint?

View 3 Replies

DataSource Controls :: SQLDataSource And Tie A SqlDatasource To A Stored Procedure

May 14, 2010

I am trying to tie a sqlDatasource to a Stored Procedure. The stored procedure looks like...

[Code]........

View 2 Replies

Visual Studio :: Design View Is Not Able To Pull In The Application For Design?

Feb 23, 2010

can't connect to sql 2005 express sp1 and vs is also sp1. 2) Which my guess is because of the database connection not being able... design view is not able to pull in the application for design, it's as if there is no theme and css just white background and black print.

View 1 Replies

DataSource Controls :: View '*' In Database In Password Column?

Apr 5, 2010

I want to view '*' in Database in password column

View 1 Replies

DataSource Controls :: How To Insert The Grid View Values Into Database

Feb 8, 2010

I have to in sert the gridview values into database, the values can be single or more than one values, so here i have to use the XML to store the data, but my question is?

i have to sent the values as a string, to the database, so how i convert that, and how could i retrieve the values as it is, and stored or display to the another gridview.

im using asp.Net 2005

View 4 Replies

Forms Data Controls :: View Image From Database In A Gridview Using Object Datasource?

May 20, 2010

I want to display images, which i stored in the MSSQL 2008 with the type of varbinary, in a gridview.

I am using N-Tier to support my web application, i can get the image's value which is in binary type, but i do not know how to display it via a gridview.

View 3 Replies

DataSource Controls :: Sqldatasource Insert Method - Copy Data To The Other Datasource By Selecting Checkbox

Feb 25, 2010

i have two sqldatasource controls. one i use to display data in textbox's ,filter'd by a select parameter in page behind code. Once checked, i want to copy this data to the other datasource ,by selecting checkbox.Then display this data in detailsview control.

At present the two datasource controls declared , render data to the page simultaneously during pageload. I want to first check data in textbox's from first source, before second datasource is rendered to screen. note, both are filtered by a page variable. i wish to leave the textbox datasource control in situ, as other controls and code depend on it.The other detailsview datasource is my problem?

View 1 Replies

Cannot View Controls In Design Mode Using Ninject.Web

Mar 4, 2011

I'm playing around with dependency injection in a web-forms website al a Ninject and whilst I have had no problem at all getting the site running smoothly I've had a pretty big problem when viewing individual pages using design mode.

I wouldn't normally use design mode but dragging and dropping web user controls onto a design space is the easiest way by far to add them to a page.

The set-up is pretty much identical to guidelines here The error on the design page is thus:

The type "page name" requests an injection, but no kernel has been registered for the web application. ensure that your project defines a NinjectHttpApplication.

I'm using Asp.Net 4.0 with Ninject and Ninject.Web 2.2 utilizing property injection

View 1 Replies

Visual Studio :: Items That Select In Design View Are Not Being Highlighted In Source View?

Sep 30, 2010

I'm using Visual Studio 2008, and when I select/highlight something in design view and switch to source view it does not highlight and scroll to the selected item. This makes it really hard to change stuff in source view, and it's very inconvenient at worst

View 2 Replies

Visual Studio :: Split View And Design View Doesn't Work?

Mar 21, 2010

Split view and design view doesn't work.I installed and uninstalled Office 2003 and 2007 once but there's no office in my computer now.-I have Microsoft Studio Web Authoring Component installed.(12.0.4518.1066)(Uninstalled and installed it twice)-My computer-properties-Advenced system settings-environment variables-system variables-path is;

[code]...
What is the problem,how can i fix it? I tried everything in other posts.

View 5 Replies

How To Focus On Controls Inside A Table In Design View In VS

Feb 4, 2011

i created an asp table in the markup view and inside the table row/cells i insert controls too.

it works fine.

when i go to the design view i and i point the table , i can't get to the controls inside the table,

how do i focus on the controls inside the table in the designer view?

View 2 Replies

MVC :: Action Links Does Not Appear In Masterpager Design View Nor In View Page?

Mar 3, 2011

i am trying to but a menu of links in master page

but they does not appearr

here is the code

[Code]....

View 5 Replies

Changing SqlDataSource.SelectCommand At Runtime Breaks Pagination?

Jul 23, 2010

I have a GridView bound to a SqlDataSource with a default SelectCommand defined as such:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataSet"
ConnectionString="<%$ ConnectionStrings:MyConn %>"
ProviderName="MySql.Data.MySqlClient"
SelectCommand="select * from blah blah" />

There are cases where I have to change this query dynamically at runtime, so I do the following:

SqlDataSource1.SelectCommand = sql; // 'sql' is the new query
GridView1.PageIndex = 0;
GridView1.EditIndex = -1;
GridView1.SelectedIndex = -1;
GridView1.DataBind();
updatePanel.Update();

This works just fine actually, but when I click the pagination controls, the result set defaults back to the SelectCommand defined in the SqlDataSource1.

View 2 Replies







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