How to Save an Image in a SQL Server Database?

by a Guest on October 21, 2010 0 Comments

Most of the web applications have a lot of images used in it. These images are usually stored in a web server folder and they are accessed by giving the relative path to the file with respect to the root folder of the website. .Net being the platform for distributed application now, ASP.Net can be used to store images that are small to be stored in a database like SQL Server 2000 and later versions. For this purpose the SQL Server database provides a data type called "image" which is used to store images in the database.

To access these images stored in the database we will be using the ADO.Net classes. To find out how to insert and retrieve an image in to the SQL Server database, you can create a .aspx page which can have a HTMLInputFile control which is used to select the image file ...

read more

SQL Server - Retrieving a Range of Rows With Multiple Nonclustered Indexes on the Table

by a Guest on October 21, 2010 0 Comments

Take the following query:

SELECT * FROM accounts
WHERE
BalanceRemaining BETWEEN 100 AND 200
AND
CustomerNum BETWEEN 1000 AND 1200

If no relevant indexes exist on the table, a table scan would be performed. If a nonclustered index exists on the BalanceRemaining column, the query optimizer might use that index. This would depend on the number of records returned. If too large, the index would be ignored. If a nonclustered index exists on the CustomerNum column, it might be used by the query optimiser if numbers are no too large..

If the query optimiser chooses to use one of the indexes, then SQL Server would process the range specified in the where clause by issuing a data page request for each pointer (assuming there is no clustered index on the table, so we are dealing with Row ID's).

As each row is returned, the remaining criteria would be applied to ...

read more

Microsoft SQL Server Reporting Services (SSRS)

by a Guest on October 21, 2010 0 Comments

SQL Server Reporting Services (SSRS) is a report generation software system of Microsoft in Server-Side. It is using to variety of interactive and useful reports. It is generated with the help of Login-Id and Pass on web based Interface. Its main is RS with the help of web based interface to support the development of custom reporting applications.

Parameters in Microsoft SQL Server 2000:

There are so many types of parameters but some of the most useful to know are:

1: Selecting all or one item from a list

First Create a Data set to return @Parameter A: SELECT DISTINCT Name FROM Organization Name UNION SELECT '.All' AS Name ORDER BY A

Then the main data set add to the front IF @Parameter = '.All' SELECT

And after the SQL, add ELSE and repeat the SQL

2: Selecting the hour and Minutes or hour, Minutes and seconds.

For this a set ...

read more

Hardening Your Web Application Against SQL Injections

by a Guest on October 21, 2010 0 Comments

WARNING:

The information provided is for educationally purposes only and not to be used for malicious use

Before digging what actually SQL Injection is, let me explain you what is SQL it self.

What is SQL?

Structured Query Language (SQL) is a specialized programming language for sending queries to databases. Most small and industrial- strength database applications can be accessed using SQL statements. SQL is both an ANSI and an ISO standard. However, many database products supporting SQL do so with proprietary extensions to the standard language. Web applications may use user-supplied input to create custom SQL statements for dynamic web page requests.

What is SQL Injection?

SQL injection is a technique that exploits a security vulnerability occurring in the database layer of a web application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is ...

read more

How to Protect Your Microsoft SQL Server Database

by a Guest on October 21, 2010 0 Comments

When the server or database system of MS SQL Server 2008 or 2005 crash, it's very difficult to recover the original data backup with MS SQL code, but its not impossible. MS SQL Server database unlike other databases such as FoxPro can copy data files; the former must have a backup strategy in order to secure data backup recovery. So take an appropriate backup & recovery operation to recover corrupted data, the data of MS SQL 2008 and 2005 can be safely protected.

Restore vs. Recovery

Restore and recovery are two different concepts, but in the database recovery process is also closely linked together. The difference between restore and recovery is given below:

Restore is equivalent to rebuild the part or whole of the database from a backup. It can not change the state of database, such as offline and online.

Recovery of database means it restore the database from ...

read more

How to Repair Corrupted MS SQL Server 2008 Database

by a Guest on October 21, 2010 0 Comments

Are you facing problems while using MS SQL Server 2008 database? Then, there may be chances that the database may have got corrupt. The database corruption can occur due to various reasons such as virus infections, abrupt system shutdown when the database is open, hardware problems, etc. Due to database corruption, you would not be able to access the database or face abrupt behavior. In such cases, you should perform appropriate SQL repair methods to solve the problem. If you are unable to repair MDF file, then you should use a third-party MS SQL repair software to do the needful for you.

Consider a scenario wherein you encounter the following error message while working on an MS SQL Server 2008 database:

"Table error: Object ID O_ID, index ID I_ID, partition ID PN_ID, alloc unit ID A_ID (type TYPE), page P_ID, row ROW_ID. Record check (CHECK_TEXT) failed. Values are VALUE1 and ...

read more

Will Microsoft SQL Server Ever Pass Oracle?

by a Guest on August 16, 2010 0 Comments

Do you think that Microsoft SQL Server will ever pass Oracle?

Page 1 of 1.

Post categories

Post archives