Solved

How to declare 2 dim varchar array, lock table

Posted on 2002-07-08
1
1,097 Views
Last Modified: 2008-02-26
i use sql server 7.
1) how to declare varchar array of 2 dimension and how to use it?
2) How to lock a table [i want to lock when a critical procedure is being executed. i want the table to be locked till proc is executed]
0
Comment
Question by:sanjaykattimani
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 7139838
1) you cannot declare arrays in SQL Server, for data storage I would create a table with 2 address columns.

2) use transactions and locking hints:
CREATE yourproc
AS
BEGIN TRANSACTION
SELECT * FROM YOURTABLE (HOLDLOCK, UPDLOCK) <WHERE somecondition>
...


COMMIT TRANSACTION
GO

CHeers
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how the fundamental information of how to create a table.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now