Solved

How to declare 2 dim varchar array, lock table

Posted on 2002-07-08
1
1,105 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

734 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