Tag: asp.net

using datapager in asp.net consum almost whole of bandwidth between SQL server and IIS server what should I do?

I have a table with 40000+ records in it, the total size of this table is something around 50Mb. I have an asp.net website in which I use a datapager and a listview. In each page I show only 10 records. Whenever I click on next/prev button on the datapager, I can see that the […]

Comparing features in a asp.net web application using different database technologies

I have a webstore which sells components (it is a academic project) which looks like this. I have developed the same web application using following database technologies: MS Sql Server with Stored procedures and sql data reader LINQ to Sql DB4o using LINQ (Client/Server) What features can I compare apart from the technical and theoretical […]

Database '…\DATABASE.MDF' cannot be upgraded because it is read-only or has read-only files

I wanna install an ASP.NET application on WIN XP SP3, Thus I’ve installed IIS 5.1 , .Net Framework 3.5 SP1 and MSSQL 2008 R2 on my WinXP SP3. Then, I copied my application folder to C:\Inetpub\wwwroot\ Next, I’ve created an application from my folder in IIS Manager and I set the permissions as the following […]

Page Redirect On Page_Load IF Record Exists

Ok, I have an default.aspx page that I’m trying to have redirect the user to a different page depending on whether or not their deviceId is stored in the SQL Server database. It should direct the user to the login.aspx if the record for the user is found or to the newdevice.aspx page if there […]

Database connection take time when user log-off? or signout from asp.net problem

i have ASP.NET application, when user log-off, and immediately trying to log-in again,it fails and page is waiting, after 20 seconds the page logins, i think the connection with database, e.g Access, inst closed. what i need to do when user log-off to close all the database conenction instances. i am using this code when […]

Import/export data from SQL Server programmatically using C# and ASP.NET

I have a web app written with C# to run in an ASP.NET environment. The web app is using SQL Server 2008 database (T-SQL) to store data. It has about 4-5 tables with data. So I was wondering if there’s anything in ASP.NET to help me export those tables along with all of their data […]

INSERT INTO Across Two Connections Strings

I know you can use Query across MSSQL with linked server for queries but would Is it possible in an ASP application having say ConectionStringA: \\Server1 Catalog=”DB1″ ConectionStringB: \\Server2 Catalog=”DB2″ Assuming the two databases have same schema to do a INSERT INTO Server1.DB1.dbo.TableA SELECT * FROM Server2.DB2.dbo.TableA WHERE Pandas = ‘ALilCreepy’ ????

How can I store more than 4000 chars in an SQL Server parameter?

I’m trying to pass XML that is greater than 4000 characters to a stored procedure. I’ve tried using NTEXT, NVARCHAR(MAX), VARCHAR(MAX), VARCHAR(8000) and XML as the parameter type but I am always getting the error: System.Data.SqlClient.SqlException: String or binary data would be truncated. The statement has been terminated. The value is not being stored into […]

Parameter not being passed with SqlCommand

I have a stored procedure that has been working just fine, but I recently added three new params to it: **@HasObits**, **@AlternateName**, and **@Notes**. CREATE PROCEDURE dbo.sp_InsertNewRecord ( @CountryID int, @StateID int, @CountyID int, @RecordsOnline bit = 0, **@HasObits bit = 0,** @Name varchar(100), **@AlternateName varchar(100) = null,** @Address varchar(50) = null, @Address2 varchar(50) = […]

SqlDataReader in ASP.NET deallocation and close

Does the following code, cleanup all SqlDataReaders correctly: using (IDataReader reader = SqlHelper.GetDataReader(sql.ToString())) { if (reader.Read()) { result = reader.IsDBNull(0) ? string.Empty : reader[0].ToString(); } } I have some concurrency/deallocation issues in my code and trying to hunt them down.

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.