all groups > sql server odbc > march 2004 >
You're in the

sql server odbc

group:

Table Locking


Table Locking SMK
3/29/2004 3:51:09 PM
sql server odbc:
Is there some fuction that allows me to put different types of locks on a table

For example, I would like to lock a table for writing, but allow other applications to read from the table

Thanks for any help

Re: Table Locking Brannon Jones [MS]
3/29/2004 6:56:04 PM
Read the following topic on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_4ox9.asp.

Under the Table Hints section it talks about the various hints you can use
that will hint to the server how it should lock the referenced objects.

--
Brannon Jones
Developer - MDAC
This posting is provided "as is" with no warranties and confers no rights.


[quoted text, click to view]

Re: Table Locking SMK
3/30/2004 7:51:09 AM
Thanks for the help Brannon,

The statement I could use would be

UPDATE myTabe
WITH (READUNCOMMITTED
SET .....

However, the driver I am using only supports ANSI 92 SQL syntax. So this is not recognized as a valid statement

Is there an ODBC function where I can achieve the same results

Thanks for the help

Re: Table Locking Brannon Jones [MS]
3/30/2004 5:27:00 PM
Are you using SQL Server? If so, the SQL driver should support this syntax.

If you are using another driver/DBMS, then you need to use the specific
syntax that DBMS supports. There is no ODBC API function that allows you to
do this in a standard way.

--
Brannon Jones
Developer - MDAC
This posting is provided "as is" with no warranties and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button