PC Review


Reply
Thread Tools Rate Thread

Database engine can not lock table

 
 
=?Utf-8?B?ag==?=
Guest
Posts: n/a
 
      21st Jun 2006
The following code produces the error: The database engine could not lock
table 'printout' because it is already in use by another person or process.

Any ideas why I am getting this error and how I can fix it? Thanks!

Dim tblName As TableDef
Dim strFieldName As String
Dim intFieldType As Integer
Dim lngAttributes As Long
Dim intMaxLength As Double
Dim tmpNewField As Field

Set tblName = dbMyDB.TableDefs("printout")

strFieldName = "ID"
intFieldType = dbLong
lngAttributes = dbAutoIncrField
intMaxLength = 100


Set tmpNewField = tblName.CreateField(strFieldName, intFieldType,
intMaxLength)'

tmpNewField.Attributes = lngAttributes

tblName.Fields.Append tmpNewField
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I get error message: Database engine not able to lock table kayesbc Microsoft Access Database Table Design 1 6th Feb 2009 01:53 PM
Error 3211- The database engine could not lock table diegov Microsoft Access 5 11th May 2008 09:18 PM
database engine couldn't lock a table AlexD Microsoft Access VBA Modules 3 14th Apr 2004 05:56 PM
Database engine can't lock a table =?Utf-8?B?Q2hyaXM=?= Microsoft Access Forms 2 25th Mar 2004 03:36 PM
The database engine could not lock table =?Utf-8?B?QWxleA==?= Microsoft Access VBA Modules 0 2nd Mar 2004 10:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:38 AM.