facebook  linkedin  Twitter  skype  Rss googlePlus

Entries for 'sql'

Replace Text via SQL Replace in a DNN HTMLText Module

Oct 19 2008
When migrating portals from one instance to another, you can use the template creation in DotNetNuke to export a template with content and then import that template to another instance. The problem you end up with however is the links tend to break as your portals directory usually has another id assigned to it. With SQL 2005 you can use the replace function to replace some text, but you're dealing with an ntext field, and you also don't want to run the replace on all DesktopModules if you have a multi portal instance. Here's a SQL 2005 sto...

Beyond Stored Procedures: Defense-in-Depth Against SQL Injection

Jul 26 2006
A few years ago, mentioning the phrase "SQL Injection" to developers or asking to adopt a "defense-in-depth" strategy would probably get you a blank stare for a reply. These days, more people have heard of SQL Injection attacks and are aware of the potential danger these attacks present, but most developers' knowledge of how to prevent SQL Injection is still inadequate, and when asked how to defend their applications against SQL Injection, they usually reply, "That's easy, just use stored procedures." As we will see, using stored procedures is ...

Calling a stored procedure from ASP.Net

May 04 2005
 By Brad Kingsley I guess I'm from the "old school" because I learned coding without a fancy GUI and I still have a tendency to lean that direction when possible. The latest version of Visual Studio is a great tool, but I still like to understand what's going on rather than just dragging and dropping controls onto a page. Perhaps with some more time I'll give up on this way of thinking, but for now I still like to hand-code at times. With ASP.Net 2.0 available now, I wanted to create an ASP.Net page that would pass parameters to a S...

Adding Images Using ASP.Net and SQL Server Database

Mar 17 2005
Note This code is for MS SQL Database Server and the "Image" DataType is used. Table Structure:   CREATE TABLE [T_EMP_IMAGES] (  [F_EMP_IMG_SR] [int] IDENTITY (1, 1) NOT NULL ,  [F_EMP_REF_SRC] [int] NOT NULL ,  [F_EMP_FILENAME] [varchar] (35) COLLATE ,  [F_EMP_IMAGE] [image] NULL ,  [F_EMP_FILETYPE] [varchar] (25) ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO You can change the structure as you like but the main things you need are; an id,and the image field. [1].Code to insert image to database: Put...

Code Snip: Using Cursors in TSQL

Feb 03 2005
Have you ever want to loop through a recordset and then perform another database operation as you go through the recordset? You may have considered doing this in the ASP.NET page, but it can really slow down your application making repeated calls over the network to connect to the database server from the Web server. In this code snip, we going to show you how you can implement cursors in your stored procedures in SQL. Alter PROCEDURE dbo.sp_InsertRecords AS Declare @id int -- first we'll pull some records out of our table. DECLAR...
Displaying 1 of 3 - Next Page


Thank you for visiting our site, before you leave, please visit some of the areas or information you may have missed.

Popular Articles