Purchase Solution

Creating scripts to Process differences between inline and script

Not what you're looking for?

Ask Custom Question

1. Because of the processing differences between inline and script on the server-side, under what conditions would you use script?

2. Create a script that uses the following components: an array, sub procedure, explicit declaration, RUNAT=Server, and a function.

Purchase this Solution

Solution Summary

I offer help with creating scripts.

Solution Preview

1. when modularity is desirable. Script is more modular. Also when the script is used more than once in the program, then use a script in stead of inline. This can avoid repeatitive code. Another occasion is when the inline is too long, then it is better to define it in a script and then use the script.

2. Database Record Killer: which lets you delete a bunch of records in one call to the page.

<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script language="VB" runat="server">

Sub Page_Load(Sender As Object, E As EventArgs)
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim myDataReader As SqlDataReader

Dim strRecordsToDelete As String
Dim arrRecordsToDelete As Array
Dim I As Integer

' Create connection object using our SQL Server connection string.
myConnection = New SqlConnection("Data Source=10.2.1.214;" _
& "Initial Catalog=samples;User Id=samples;Password=password;" _
& "Connect Timeout=15;Network Library=dbmssocn;")

' Open the connection to the database
myConnection.Open

' Create our command object
myCommand = New SqlCommand()
...

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.