News in the Category: SQL Subscribe to the rss of this category.

Total posts: 7775 | Sort by Views | Sort by Hits

Moving ASPNETDB.mdf (SQL Express) to a hosted production environment.

Sahil Malik [MVP], April 24, 2006
Views: 23,256 | Hits 153

Lately Ive been flying a lot. Last to last week, I flew from DC to Denver to Colorado Springs to Fort Collins to Denver to Chicago to Grand Rapids to Chicago to Cedar Rapids to Chicago to back to DC. ...

SQL Server FAQ : How to join tables from different servers

Mihir Solankis .NET Journal, December 8, 2005
Views: 12,383 | Hits 805

To be able to join tables between two SQL Servers, first you have to link them. After the linked servers are setup, you just have to prefix your tables names with server name, database name, table own...

How To: Change the row Background color based on the database value using GridView Control

Sushila Patels Weblog, January 27, 2006
Views: 11,605 | Hits 86

We have seen many examples on how to change the background color of row based on the data using DataGrid Control. This can be done using a helper function or using the appropriate event of the da...

SqlTransaction vs. System.Transactions

Sahil Malik [MVP], June 12, 2005
Views: 11,550 | Hits 69

Boy this question will come up a lot atleast in the initial phases of .NET 2.0, so I thought it is worth writing a blog post on. The first difference is, SqlTransaction will not work on multiple datab...

SQLAuthority News Disk Partition Alignment Best Practices for SQL Server

Journey to SQL Authority with Pinal Dave, November 14, 2009
Views: 10,856 | Hits 8

Disk partition alignment is a powerful tool for improving SQL Server performance. Configuring optimal disk performance is often viewed as much art as science. A best practice that is essential yet oft...

T-SQL: IF NOT EXISTS versus @@ROWCOUNT, August 5, 2005
Views: 9,581 | Hits 928

I was asked a good question the other day regarding why I chose to use "IF NOT EXISTS" in my Nov 2003 MSDN article on User Defined Functions to check to see if a declared table variable ha...

Cascading drop-down lists

mikes web log, October 13, 2006
Views: 8,339 | Hits 2,189

This came up at work today, so I thought I'd toss in a quick note. You can do cascading drop-down lists declaratively in ASP.NET 2.0, or at least if your scenario is straightforward. Imagine two drop-...

HowTo: Telerik RadGrid Master/Detail client-side data-binding using LINQ to SQL and WebService

the telerik blogs, September 9, 2008
Views: 8,163 | Hits 64

I've made two Master/Detail demos using RadGrid for ASP.NET AJAX, LINQ to SQL and WebService client-side data-binding. The first example is a single grid with two hierarchical levels (Customers -> ...

Sample Code: Bidirectional Sorting in ASP.NET Repeater control

Sushila Patels Weblog, October 9, 2004
Views: 8,139 | Hits 134

.aspx <asp:Repeater ID="Repeater1" Runat="server" EnableViewState="False"> <ItemTemplate> <table width="100%" cellspacing="0" cellpadding="0"> <tr>&n...

Why ASP.NET 2.0 Login control doesn't work with SQL Membership provider?

Keyvan Nayyeri, July 21, 2006
Views: 7,092 | Hits 665

In addition to previous post, another issue that someone had asked on ASPnix forums was about Login control in ASP.NET and SQL Membership provider.  He couldn’t make his Login control ...

Linq Tip #2 - Find overlapping date ranges

Williams .Net Zone, September 29, 2007
Views: 6,950 | Hits 746

/* * A deceptively ~simple self-join query to find all date ranges in a table that overlap. * A date range is defined by the range between InTime and OutTime. * The "Seq != Seq" filter is re...

SQL SERVER - Import CSV File Into SQL Server Using Bulk Insert - Load Comma Delimited File Into SQL Server

Journey to SQL Authority with Pinal Dave, February 6, 2008
Views: 6,653 | Hits 1,007

This is very common request recently - How to import CSV file into SQL Server? How to load CSV file into SQL Server Database Table? How to load comma delimited file into SQL Server? Let us see the sol...

Accessing Profile Data in the aspnet_Profile table using TSQL Queries

David Silverlights Web Log, August 23, 2005
Views: 6,650 | Hits 1,105

One of the great new features of ASP.NET 2.0 is that persisting user profile data is about as easy as you can get.  You simply define the profile values in your web.config file and the framework ...

rsStreamNotFound error in Reporting Services

Bigyan Rajbhandari, July 15, 2006
Views: 6,444 | Hits 347

Anyone who is using Reporting Services 2000 and rendering the report in HTML has porbably seen the error rsStreamNotFound with embedded or external image. While reading through various blogs one thing...

SQLite - Database is locked

JonGalloway.ToString(), July 8, 2005
Views: 6,439 | Hits 504

Summary:SQLite is a great, free, embedable database. It's fast, tiny, and reliable, and has some cool features like support for NTFS compression of the database file. It's multithreaded, but its coars...

Update: GridView Custom Paging with ObjectDataSource

TheChaseMans Frenetic SoapBox, January 21, 2006
Views: 6,437 | Hits 993

About a month ago I posted some code for implementing custom paging with the GridView and ObjectDataSource with the goal being a single database call to get the records and the rowcount. The code ...

Implementing SqlBulkCopy in Linq to Sql

Wortzels blog, May 5, 2008
Views: 6,265 | Hits 996

As I already mentioned in one of my previous post, the SqlBulkCopy is a powerful tool which gives us an option to perform insertion for a large amount of data. The evolution of the ADO.NET creates us ...

Sharepoint 2007 - Enabling Custom Authentication using a Custom Membership Provider

Sahil Malik [MVP], April 28, 2006
Views: 6,259 | Hits 136

(The below per Beta1TR) A big huge GARGANTUAN limitation of Sharepoint 2003 was it's crazy psycho obsession for nothing but Windows Authentication. You could customize that to some extent by plac...

SQLCLR: How many concurrently open context connections can you have

Sahil Malik [MVP], July 26, 2005
Views: 6,234 | Hits 116

Okay so My Dear Guinea Pig, I am doing a usability test on you. In my Upcoming ADO.NET 2.0 book, I am trying to explain a restriction you have on "How many SQLCLR context connections can you have op...

Inserting with a SqlDataSource Using uniqueidentifier Parameters

Scott on Writing, November 16, 2005
Views: 6,221 | Hits 122

Scenario: Creating a page with an editable GridView or insertable DetailsView (or FormView) that uses a SqlDataSource whose contens are generated through the Configure Data Source wizard. Specifically...

Building a Rules Engine with SQL Server

MSDN: SQL Server, February 24, 2006
Views: 6,212 | Hits 1,113

Discover how to create a rule engine in SQL Server. Use this simple rule-engine design to implement state machines, predicate dispatchers, or any other rule-based system in a wide variety of applicati...

Reading Sql Server Image/Blob data in Visual FoxPro 9

Rick Strahls WebLog, August 6, 2006
Views: 6,195 | Hits 1,010

Bob Lucas posted a nice Visual FoxPro 9.0 tip on the Message Board earlier today in respect to how you can get Image values in and out of a SQL Server database and I thought I’d repost this here...

LinqDataSource vs ObjectDataSource vs SqlDataSource

Dino Espositos WebLog, September 24, 2007
Views: 6,113 | Hits 616

With ASP.NET 3.5, a new data source control joins the company: the LinqDataSource control. How does it position itself in the grid of data source controls? The difference between SqlDataSource and Obj...

Export data from MySQL to excel

E-Surfers Weblog, August 4, 2005
Views: 6,042 | Hits 388

In my recent post I wrote something about import excel data into mysql database. In this entry, I want to talk about the steps I take to export the data of a mysql database into an excel file. 1. Crea...

A deadlock was detected while trying to lock variables

Pencil Bros. Geology, Inc., June 17, 2008
Views: 6,027 | Hits 11

The following error is a new thorn in my side. Its showing up in SSIS 2005 packages which are scheduled, but does not happen when I run the packages manually. I changed the message slightly to remove...

Case Sensitive or Insensitive SQL Query

Steven Smith, September 30, 2007
Views: 5,864 | Hits 26

Suppose you need to perform a SQL query and you need for it to be case sensitive or case insensitive, and either your database is set up the opposite way or you're smart and you're trying to write you...

Change Login's Default Database in SQL Server

Gregg Stark on SQL Server, October 16, 2007
Views: 5,863 | Hits 574

If you have ever dropped a database and found yourself not able to login because your default database no longer exists you know it can be quite annoying.  You can still connect through query ana...

Table Variables In T-SQL

OdeToCode Latest Articles, May 7, 2005
Views: 5,841 | Hits 694

Table variables allow you to store a resultset in SQL Server without the overhead of declaring and cleaning up a temporary table. In this article, we will highlight the features and advantages of the ...

SQL Tool to Read SQL Transaction Log Released

DotNetJunkies Just Published, April 8, 2005
Views: 5,821 | Hits 110

Apex SQL Tools has a new version of Apex SQL Log, SQL Tool for database auditing. Apex SQL Log is a SQL Tool that analyzes SQL Transaction Log to display data & structure changes. Apex SQL Log rea...

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances

hongmeigs WebLog, August 31, 2007
Views: 5,818 | Hits 503

If you are getting the following error: Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances What should I do?   Answer: To fi...

ASP.NET 2.0: CacheKeyDependency

Dino Espositos WebLog, August 8, 2005
Views: 5,763 | Hits 374

Imagine you have a master/detail page with a GridView and a DetailsView. You select a record in the DetailsView, make some changes and save. How can you have the master element--the GridView--refresh ...


Jotekes Blog, October 26, 2005
Views: 5,656 | Hits 525

In case you've installed SQL Server Express and found out that there are two executables for installation (for example when installing SSE bundled with VS2005) SQLEXPR.EXE and .SQLEXPR3...

Using SqlBulkCopy To Perform Efficient Bulk SQL Operations Headlines, October 21, 2009
Views: 5,410 | Hits 51

Over the years I've worked on a number of projects that have shared a common requirement - the ability for users to quickly import large amounts of data into a back end SQL Server database. One such...

Utilizing Custom Fonts with SQL Reporting Services (SSRS) and Exporting to PDF

Clarity Blogs: ASP.NET, January 18, 2010
Views: 5,394 | Hits 10

I recently had a unique challenge with SSRS which was the utilization of a Custom Font on an SSRS Report. Normally, I do not think about fonts other than what get installed as system fonts in Windows ...

Paging Done RIGHT (in SQL Server 2000 & 2005)

Scott on Writing, April 25, 2006
Views: 5,362 | Hits 156

In an earlier article of mine, Custom Paging in ASP.NET 2.0 with SQL Server 2005, I wrote about SQL Server 2005's new ROW_NUMBER() function,which makes efficiently returning a paged result in SQL Serv...

SQL SERVER - 2005 - Get Current User - Get Logged In User

Journey to SQL Authority with Pinal Dave, October 27, 2007
Views: 5,339 | Hits 664

Interesting enough Jr. DBA asked me how he can get current user for any particular query is ran. He said he wants it for debugging purpose as well for security purpose. I totally understand the need o...

Returning the First Day of the Month from a Given Date/Time value in SQL Server

Scott on Writing, December 5, 2006
Views: 5,318 | Hits 179

First off, it's been a long time since my last post, close to a month! Things have been very busy between the new batches of Working with Data in ASP.NET 2.0 tutorials, the monthly Toolbox column, oth...

Keeping ELMAH's Error Log Size In Check

Scott on Writing, July 10, 2009
Views: 5,301 | Hits 71

Error Logging Modules And Handlers (ELMAH) is a free, open source error logging library for ASP.NET applications that provides automated error logging and notification and, unlike health monitoring, o...

Oracle Database ASP.NET 2.0 Provider Schema : Work In Progress

Steven Swafford - ASPAlliance Columnist/Editor, July 10, 2006
Views: 5,292 | Hits 259

I thought I would begin creating a custom provider for Oracle and I am starting with the database schema. Now this is a work in progress and I am attempting to complete this between my job, family, an...

Replacing an MSMQ queue with a SQL Server 2005 queue

Write Ahead Blog, April 28, 2005
Views: 5,274 | Hits 766

Today, we did a short presentation on Service Broker for a customer who is interested in using the Service Broker technology. Their current application uses a large backend SQL Server d...

Entity Framework vs. Linq to SQL

Wortzels blog, January 4, 2008
Views: 5,235 | Hits 1,416

These two data access strategies should be shipped in the new Visual Studio 2008 (aka "Orcas") but from some reasons Microsoft decided to cut the entity framework from this release and to sh...

MySQL Data truncation Error

E-Surfers Weblog, October 27, 2005
Views: 5,191 | Hits 238

When I recently upgraded to MySQL 4.1.10 and Connector/J 3.1.8, I got the following Exception: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'productid' at row 1 In mo...

Efficiently Paging Through Large Result Sets in SQL Server 2000 Headlines, April 12, 2006
Views: 5,146 | Hits 402

When displaying large amounts of data to a user, it's important that the information be presented in digestible chunks rather than slamming it all down their throats at once. For example, searching fo...

ASP.NET MVC Flexigrid sample

The Code Project Latest Articles, October 31, 2008
Views: 5,120 | Hits 414

How to create an ASP.NET MVC sample using LINQ to SQL, Flexigrid for JQuery and Json...

how to build a simple database application using WPF New Articles, April 14, 2010
Views: 4,979 | Hits 13

Build a simple database application with WPF that can display data in GridView and can perform ADD, UPDATE and DELETE operations on SQL server database.  read moreBy Kirtan Patel...

SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server

Journey to SQL Authority with Pinal Dave, August 9, 2008
Views: 4,942 | Hits 193

If you are receiving following error:TITLE: Connect to Server——————————Cannot connect to Database Server.——————————ADDITIONAL INFORMATION:An error has occurred while establishing a connection to the s...

How do I convert a System.Transaction.Transaction to an IDBTransaction?

Sahil Malik [MVP], March 30, 2006
Views: 4,935 | Hits 64

This question was asked by one of the codebetter members, I just figured it may be a universally asked question, so instead of replying by email, I'm puttin' it on my blog instead. Sorry if I'm talkin...

SQL Server 2005 Database optimization Interview questions

GotDotNet: New resources, July 21, 2006
Views: 4,907 | Hits 407

SQL Server 2005 Database optimization Interview questions must for every DBA...

ASPNETDB + Production deployment --> Practical Tips.

Sahil Malik -, May 19, 2006
Views: 4,881 | Hits 534

One of the biggest curse (in my eyes) and blessing, in ASP.NET 2.0 is that little cute web server that runs in your system tray. It's a blessing because it makes development and sending and receivi...