DataSource Controls :: How To Use Database Views
May 17, 2010I have a bunch of views in my database that I want to use in my application. What's the best (fastest and/or easiest) way to use these? I'm using a sql server database.
View 5 RepliesI have a bunch of views in my database that I want to use in my application. What's the best (fastest and/or easiest) way to use these? I'm using a sql server database.
View 5 RepliesI want set roles and views to my dataBase.
this three roles: FullAccess - BasicAccess - ReportingAccess
I don't know how I can set this three to my database for users access.(webapplication)
I'm using sqlserver 2008 and visual studio 2008.
Cannot seem to find a good fit for my question so I will ask here.
Does Asp.Net 4.0 solve the problems with using Views with EntityFramework is not able to recognize primary keys.
I have 50000 record in two tables which need to show in grid? and the records in the table use to insert , update and delete frequently. I need to load fast all the records. which method i should bind to get as quick as early as possible. Which z best method to bind whether using SQL datasource, creating views, using datatable, creating stored procedure etc?
View 8 Replies I probally just tired but I would have swore I had seen an example of this some where for MVC 2,
I want to call a partial view that shows the products information with a GUID passed to the partial view.
I guess you would call it calling a sub but have that sub in a view that i can strongly wire up.
What i need is tutorials for passing a value to the partial view.
Like if i had pictures and i wanted to call a ascx that would show the picture. and have many to a page.
An example about pictures wired into a entities database would rock.....
I did try to look around on here to find some but my mind just gave out on me today....
I am learning MultiView control.Here are question:I added 5 views in the MultiView but all views are tight together. I can not drag and drop another control such as text boxes or labels into view area.
View 15 RepliesI'm trying to figure out if it's possible to transfer records from SQL central database (who has a public IP address) into SQL local database (who doesn't have a public IP)?
or if it's not possible can I use a centralized website instead to pass some data into the local website? (but i'm not sure if it will have some security concerns)..
Consider the following scenario: Page written in classic ASP or PHP, which is rendering a data report (series of HTML tables for simplicity). There is one main database query and then multiple sub queries as the page renders. The report is split into sub panels, which correlate to a sub query. Therefore:
Main database query. Loop over result. For each row, execute sub query and render report panel. How would you architect a similar report using the MVC pattern? This can be split into two parts: Efficiency at database level of multiple queries, which are dependent on values from an outer query. If all data was processed and prepared in the controller, would this also be deemed inefficient if looping within the controller and then again in a view to render. Could sub controllers be used or sub panels, which encapsulate smaller sections of logic i.e. loading data and rendering report panel.
Creating a system with web front end and SQL backend (microsoft obviously). I have tried using the asp.netsqlprovider but i can;t as i am only allowed one database on the server, so i then tried to update my current database with the triggers to input the schema into the already existing database.Next step i create my own table with two simple fields of username and password and try and authenticate that way, i can't get that to work either.
I ahve limited permissions on the network as i am a University Student. I really don't know what to do. Never had to create a log on system before and i thought it would be far simpler than this. I ahve used Microsoft's sqlprovider schema before and it worked fine. I have also authenticated via IIS and AD too before. I can't do any of those two in this instance it seems.I need an alternative for logging in users, if needs be in can be crude. I also still need to have some kind of two different views too for logged in users and not logged in users, but that can change if needs must.Don't let me down people, haha. Think this posts in the correct place, i could not find another one i thought could be more relevant.
I have some data which is in mySQL, i am not familier with mySQL, i would like to transfer all the data from MySQL to SQL Server database,
View 11 Repliesi would like to ask about how to sync data from client sybase database import to our sql server database regularly(set time to sync everyday) by create a file in our sql server database
View 1 RepliesI have a development database and one in production. There are two different sets of data in each database. On my dev system, I have mostly dummy data that I test with and in production is the real data for my web application. I recently added a new feature to the app that required a new table, and a new field for a foreign key in an existing table. I now need to upload that new structure to the production database without overwriting the live data with my test data.
If I run the Database Publishing Wizard, and choose "Schema Only" will it import the new structure and leave the existing data alone, or will it drop the records in my production database tables?
I have created a sdf database in a mobile application.Now I want to synchronize that database to a sql server database.
View 1 RepliesI have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller,
View 1 RepliesFirst off, I am just getting started with ASP.NET so I expect this is something that I am doing.
i am trying to make a connection to a MS SQL database on my local machine.
I have the following in web.config
[code]....
when I make restore to backup database display this error :
The backup set holds a backup of a database other than the existing 'elib' database. (Microsoft.SqlServer.Smo)
how I can solve this error ?
This is a very common error as evidenced but the very large number of problems and suggested solutions on the web. I finally got around it last week but can't remember what was the step that did it. At that time, I was building a web application rather than a web site. Is that the difference? As you can see, it is no longer in the APP_DATA folder and is named membership.mdf rather than aspnetdb.mdf. I ran aspnet_regsql.exe to create it and actually had it working and was updating it successfully. But for other reasons, I had to scrap the application and decided to re-create it from scratch as a web site rather than a web application. I had been using Visual Studio 2008 to build the web application but am now using Visual Web Developer 2008 Express Edition to build the web site. Unfortunately, the Visual Studio application will no longer open so I can't verify that the web application still works. Can anybody help? (Please!!!) BTW, ASPNET and NETWORK SERVICE both have full control over the membership.mdf.
View 1 RepliesI use VB.net and use sql database. My database' name is database.mdf. I create one button and one textbox controls. When put some words in the textbox and click button, the words will recorded in to database.mdf. How can I do it? If I put a paragraph of sentence maybe 1000 words, is it also ok?
View 1 RepliesI have multiple database running in my SQL Sever , in that I need to lock only one database is there is any inbuilt method in SQL Server 2008
View 1 RepliesCan we perform Database connectivity without using ado.net?
Can we create our own architecture to connect to database?
I have an SQL database which I wish to query, I have the queries set out and working using the SQLDataSource Control.Is there any way of using web methods to query an SQL Database.I realize this may not be ideal when the SQLDataSource control offers such functionality but it is for a piece of college work and I am not entirely sure which way they want it to work, as all it says is to "Implement a client application and a set of web services".
So is it possibile to use a WebMethod to perform SQL based queries or queries which are not SQL based and if so how do you go about creating them?
There is any another way to connect SQL Server database instate of Server Explorer i ASP.Net MVC .If yes tell me How?
View 3 Repliesi am trying to update the database for a simple bank project. I am updating the current balance of an account. What i did was read the current balance first then add the deposited amount and then trying to update it to the database. here is the code
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection newSqlConnection = new SqlConnection();
[code]...
I need to do a database persistence asynchronously. So am using BeginExecuteNonQuery and EndExecuteNonQuery methods.
IAsyncResult Async = cmd.BeginExecuteNonQuery(null, cmd);
--code---
int number= cmdE.EndExecuteNonQuery(result);
Now this will work if i want to update or insert. Now what i want to do is, i need to insert values in a table and i need to retreive the identity column value for the values which are being inserted. So once the values are inserted, how do i retreive the identity column value corresponding to those inserted values. Here am passing null value in BeginExecuteNonQuery method. So what change should i do to retreive the last identity value.
I'm sure this is very trivial but I'm trying to create anchor tags based on data in a database. Here is a my code.
[Code]....