To Use .NET 4.0 Only For Accessing The Database?
Oct 13, 2010
I am currently learning JQuery by reading ebooks. I don't think by reading ebooks is good enough. So can I build a shopping cart website using both JQuery and ASP.NET 4.0 ? I plan to use ASP.NET 4.0 only for accessing the database only.
View 3 Replies
Similar Messages:
Feb 28, 2010
I have a website that writes and reads data from a database.It will help me to read and write to the same database from a separate website.Do I have a problem with "collisions" or are the calls to the database completely separate ?
View 4 Replies
Apr 6, 2010
I have a ASP.NET MVC application which is build up as an assembly that queries the database and a asp.net frontend that references this assembly and this assembly abstracts the underlying database. This means that my Assembly contains a app.config file that contains the connectionstring to the database (Linq to Sql data model). How do I go about making this more flexible? Should i make a "initialize()" method somewhere in my assembly which takes the connection string from the asp.net mvc application and then that controls which database to use? or how is this done?
View 1 Replies
Jan 4, 2011
This is related to a previous question I asked, regarding splitting a asp.net mvc web application into two apps - one public, and one admin. Both of them would be sharing the same database of course.
With two web apps I'll have two host applications and so two seperate Nihbernate session factories. My concern is that their seperate data caches will cause all sorts of problems.
While posting this, I looked at this question, which covers a similar problem (for a different reason). I really don't want to have to set up some kind of distributed cache just for a low use admin application.
How can this be resolved? Is separating the admin section into it's own application not possible with NHibernate without drastic measures?
View 2 Replies
Jun 27, 2012
I have a web app that is trying to open a SQL Server Database and it's not working. The error that I am receiving is below:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."
What needs to be done regarding the highlighted line in the error message?
View 2 Replies
Jul 2, 2010
I know this is a beginner question but I am struggling to find any clear tutorials etc on how I can create new records in a database table based on information added into text boxes on a page. Also what is the best way to do this LINQ, dynamic data website etc etc?
View 1 Replies
Sep 21, 2010
I made a website, 1 database; We have 4 cumputers, the 4 are using the same website and saving datas at the SAME TIME.
The problem that i have is that when 2 people click in the save button at the same time, only onces is in the database, but the others get lost.
Visual Studio 2010, Framework 3.5, MS-SQL 2008, C#.
The conecction is in c#, everthing is in c#.
View 1 Replies
Dec 1, 2010
I am working on a website where when the user logs in, I select their database based on their username. Currently I have a list of all databases in the web.config and I select the Database ID from the username and then read the database string from web.config. What is the most optimal way to implement this scenario?
currently I:
- store the Database ID in the session object
- the Session object expires after like 5 minutes so i have to read the Database ID from the online database based on the username and regenerate the Session["DatabaseID"] again.
- there are some security issues with the Session ID, so I started clearing the Session in !(Page.IsPostBack) and I generate the Database string again.
Where shall I store the DatabaseID and the database connection string so I can easily reuse it once the user has logged in?
View 8 Replies
Apr 12, 2010
I have created an access database and i have shared (permision is full for everyone) the folder to get access to it. It works fine from the same domain from any pc i am able to access it.
but was not able to access it from a different domain. is there anyway i can make it happen???
basically all are under same company but different location hence different domain i am able to access anything that is shared
from any location
from other domain just by typing \ and the computername or IP address to get me the shared folder
see the connection string i have used
[Code]....
View 3 Replies
Aug 2, 2010
To give some background details, I have created a website for a friend that has a few pages that require a database in the background. I've used Visual Studio templates for most of it, so there's the standard ASPNETDB.MDF file that's created for users and groups, a login page and a page to view and manage those users etc etc. The login page uses the standard controls for logging in, retrieving lost passwords and so on. Being standard controls, by default they get the connection string from the web.config file. Upon attempting to upload the site to my host (1and1.co.uk in case anyone else has any dealings with them) I discovered that storing the connectionstring doesn't work. 1and1 support say that the sql databases can only be accessed using scripts like this (this is an example of theirs):
<html>
<title>Queries from the MS-SQL database with ASP</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP</h2>
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=mssqxxx.1and1.com;UID=dboxxxxxxxxx;PWD=xxxxxxxx;DATABASE=dbxxxxxxxxx"
'This code block will create a recordset
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from products"
rs.open SQL, conn
'will iterate to display the records got from the database
While Not rs.EOF
response.write(rs("id") & " " & rs("price"))
rs.MoveNext
Wend
'closes the connection
rs.close
conn.close
Set rs = Nothing
Set conn = Nothing
%>
</body>
</html>
So my question, is it possible to get the standard asp.net controls to access a database through a script like this?
View 8 Replies
Jun 1, 2010
I need to do an insert into a database table (SQL Server). I want to compute value of 1 column based on the existing data and then do an insert. How do I prevent another user from getting access to the database in the middle of this process?
View 2 Replies
Sep 28, 2010
I wish to acces my database using MSSMS at the same time that I am running my web application. When I tried to access my database with MSSMS I get the following error:Failed to retrieve data for this request (Microsoft.SqlServer. Management.SDk.Sfc)Additional Information:Unable to open the physical file "C:inetpubwwwrootmyappApp_Dataaspnetdb.mdf".Operationg system error 32: "32(The process cannot access the file because it is being used by another process)". (Microsoft SQL Server, Error:5120).What can I do to being able to view my database with MSSMS at the same time?
View 5 Replies
Mar 25, 2010
I need to make a webservice in .net (I know how this works) but then I need to get data out of a database. But my company wants to make it in a way that you can use the system with multiple databases.
So my option was make multiple abstract classes which contains the folowing code (depending on the database type, this would be a SQL database)
public abstract class AbstractDAO<T, Tid>
View 5 Replies
Aug 25, 2010
I have a datalist and I am filling it using a dataadapter, dataset. So in my .ascx page, I have
<asp:datalist runat="server" id="dlProducts" repeatcolumns="2" repeatdirection="horizontal">
<itemtemplate>
<table border="0">
<tr><td><%# Eval("Item_Name") %></td></tr>
<tr><td>I have to add a picture here</td><td><%# Eval("First_Name") %></td></tr>
</table>
</itemtemplate>
</asp:datalist>
In the area where I have put a statement like "I have to add a picture here", I have write a big case statement. Like:
Case: 6 // show a picture from file1
case: 7 // show a picture from file2
Case 8: //show a picture from file3
So How do I do this here? Because I dont know how to access the datalist values from code behind.
Here is my code behind:
SQLString = "SELECT First_Name, Picture, item_name, item_id from table1 where item_id = " + request.querystring["iid"];
dataadapter daItems = new dataadapter(SQLString, "connection_name");
dataset dsItems = new dataset();
daItems.fill(dsItems);
dlProducts.datasource = dsItems();
//So at this point how do I populate the picture in the <TD> tag I mentioned earlier?
View 2 Replies
Jan 13, 2010
I am attempting to write my very first ASP.NET application, it will simply display the contents of an SQL server database table in a Gridview. This is just a first step, my eventual intention is rewrite a set of VB6 applications I wrote some years ago. But I need to walk before I can run.
I have already created an SQL Server database containing all the tables used by the VB6 applications.
How do I link this database to my ASP.NET application. Previously (on another computer) I have simply opened "My Computer" and then navigated to the .mdf file (e.g. northwnd.mdf) and then dragged and dropped it into App_Data in Visual Studio. However when I try that on my own machine, with my own data, I get an "Access Denied" message.
How can I not have access to my own data on my own computer? What am doing wrong?
I am running Visual Studio 2008 on a Windows 7 Ultimate machine, with SQL Server 2005 Compact Edition (or which ever one installs with VS 2008).
View 13 Replies
Mar 8, 2011
I am developing web application using asp.net. Here i need to access two databases in which one is present on other server. I am able to connect to database present in same server but not with database present in other server.
I am using MS-access. I dont know the changes to be done and syntax for database connection.
View 3 Replies
Jan 6, 2010
I'm currectly tryin to access a specific value in my database in a specific column. I'm tryin to use the primary key of the table to access the actual value in the row of that ID.
The current code:
[Code]....
Just iterates through the table and looking for any row with the boolean 'checkin' value is True, then it takes the 'id' value of that row and stores it into an array. Is there a way that I can access a another entry, and only that entry, in the table with the 'id' stored in the array?
Like if my data base contained and int, primarykey, `id` value, a boolean, `checkedin` value, and a `time` value, is there a way to access, lets say, the row with `id` equalling 3 and and the checkIn value from that row?
View 2 Replies
Mar 16, 2011
Okay, I have developed VB.NET winforms applications and I understand that working with ASP.NET would be similar. However, this seems way complicated then I thought. Basically, i am working on accessing one table data from a database and populating data in a datagrid. I have few text boxes on the display page and if a user clicks on submit button i want a new set of data with new select statement based on user input.
I don't quite understand how the textbox value can be passed on the same page and a new select statement is generated, which then populates the datagrid.
View 2 Replies
Dec 10, 2010
I built an ASP.NET 4.0 Web Site. It works perfectly on my development computer. However, when I deploy the web site to theProduction Server, which is a Win2003 Small Business with Sql Server 2000, the site can't connect to the database.
These are the different tests I've made:
I tried using Integrated Windows authentication and this connection string: Data Source=myServerAddress;Initial Catalog=myDataBase;Integratedsecurity=true; and the error I got was that NT Authority/Network Service couldn't open the database. So I added that account to my database users list and gave it the appropiate permissions. Nothing.I tried using Sql Server authentication, so I created a new database user with a password and changed my connection string toData Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;. Nothing. I still got the same NT Authority user message.I deleted the used I created in step 2 and used the same connection string, to see if this time I got an error saying something about my user, and indeed it happened. I got an exception saying that user myUsername couldn't log on. I then created the user again, ang got the NT Authority user message one more time.I created a console application that used the same connection string from steps 2 and 3, and it connected to the database witouth any problem, which made me think that my problem's got something to do with my Web.config.I tried enabling impersonation on my Web.config, and thos time I got the same error message, only referring to the user I logged in to Windows, instead of NT Authority/Network service. What else could I check? My Web.config is this in case it helps (I havn't really put anything into it other than what VS puts):
[Code]....
View 10 Replies
Jan 17, 2011
I have written an ASP.NET MVC 2 app that uses forms based authentication. It is running on IIS 7.5. When I access the site from the local box, I can see it. When I access it from the outside, I get a generic 401 error. It's odd. Two other MVC2 sites that sit in the same virtual directory work fine no matter where you access it from. I thought it might have been something to do with authorization, but the authorization tag between the three sites are near identical (except for the 'name' attribute). Regardless, I commented out the authorization tag and got the same error (except now, it doesn't try to redirect me to the login page before getting the error).
I'm a bit lost as to what could be going on.
View 1 Replies
Oct 5, 2010
I have an Xml Schema File [.xsd]
And i Need to Accesss the Primary Key Of Table Exist
View 1 Replies
Dec 18, 2010
I have a simple WCF service that retrieves some data from the DB. When I host the service on local serviceHost everything works fine, but when I host the same service on local IIS (7.5 - windows 7) I get this exception: The Undelying provider failed on open.
I have some logging services inside the service and I found out that this exception occures only when the service calls some DB service (not one particular, any DB service). The strange thing is that when the service is not hosted on IIS this same DB call works fine.
Things I've done: enabled ASP.NET impersonation on the IIS server -> didn't help.
Another thing : I'm using sql server 2008 express.
View 5 Replies
Mar 28, 2011
I have a form that contains an asp:Menu control. One of the menu items is "Login" item. The way I want my application to work is when user gets to the main page, I want all the menuItems to be disabled except for the "Login" item which forces the user to login into the system. Once logged in, all the other Menu Items will become enabled.
My problem is, in my Master Page code-behind logic, I have a routine that disables all the menu items except the "Login" item. What I want to do is also change the backcolor property for each of the disabled menu items. Here is my code below:
Code:
Private Sub DisableMenu()
Try
[code]....
The Red highlighted lines of code will do what I want but it also changes the color of the "Login" menu item which I don't want.
View 3 Replies
Sep 7, 2010
In ASP.NET I have a form that has a Textbox named txtOutput and a button. In the main file.aspx.vb I can call a function from the button handler and in that function I can have
txtOutput.Text = "Some Message"
with no problem. I have a bunch of functions in several other classes. For instance I have a class named AbleCommerce that does some database functions. These functions are called from my main class. In those functions, however, I have no visibility of txtOutput. All of my classes are, unfortunately, in the default namespace which I understand is not optimal but didn't seem to impact this issue.
I know this is an easy one I've just not understood properly but it has me stumped. My gut says that I probably need to pass the Textbox object to my "other class" but can't for the life of me figure how.
View 2 Replies
Mar 31, 2010
Surprised that i havent been able to find this myself, but anyway. Let's say i use my web user control like this:
<myprefix:mytag userid="4" runat="server">Some fancy text</myprefix:mytag>
How would i be able to access the text inside the tags from its codebehind ("Some fancy text")? Was expecting it to be exposed through this.Text, this.Value or something similar.
EDIT:
I even get the following warning on the page where i try to user it:
Content is not allowed between the opening and closing tags for element 'mytag'.
EDIT2:
public partial class mytag: UserControl
{
public int ItemID { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
}
}
View 1 Replies