473,657 Members | 3,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADODB connection can't open. Database locked.

Hi, I used DAO and it works fine. But when I try to use ADO, it says
the database is locked by the user. How can I get around this? Which
property should I set?
Thanks.
ming

Nov 13 '05 #1
1 4106
swingingming wrote in message
<11************ **********@g14g 2000cwa.googleg roups.com> :
Hi, I used DAO and it works fine. But when I try to use ADO, it says
the database is locked by the user. How can I get around this? Which
property should I set?
Thanks.
ming


Since there's no information about how you're performing this, which
line gives
an error... it'll be guessing... and here's one guess

- if you're using the current database, don't open a connection on it,
but use
currentproject. connection as your connection
- if you're invoking this from a bound form (I wouldn't know why one
should
that), but then issue some kind of save comman first, for instance

if me.dirty then me.dirty = false

- are you opening a connection against a separate db (in stead of
using
currentproject. connection to get at linked tables), you might want
to check out
your connection string here

http://www.carlprothman.net/Default....orMicrosoftJet

watch for breaks in the link

--
Roy-Vidar

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2439
by: Bina Desai | last post by:
I get the following error: Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' /myweb4/authorised_user_page.asp, line 70 and line 70 of my code is: <% rsCheckUser1.Open strSQL1, strcon1 %> Here is the full code:
13
7770
by: Patrick | last post by:
I understand that with IIS5.1 on Windows XP Professional SP1, I can 1) Either set under IIS Manager-> Any specific Virtual Directory-> Configuration->Options->ASP Script timeout for all pages within that directory OR 2) Within a specific page, set the timeout as per http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/asp/vbob246s.htm e.g. <% Server.ScriptTimeout = 1 %> and that the value in...
0
2474
by: Channing Jones | last post by:
Hello everyone, I am trying to store data in a binary field of an SQL-Server table using ADODB. So far, I have managed to store a record but not any data in the binary field. I only get exceptions on various part. I have tried both AppendChunk and using a stream object. Unfortunately all the examples I can find in the Net and on the Microsoft site
5
29832
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As Long) As Boolean Dim rsAssignedUser As ADODB.Recordset Dim strSelectUser As String
1
20420
by: Nigel C | last post by:
Access 2000 - A am trying to access another Access 2000 database from a code module. I have seen examples of the ADODB connection string - to connect to an access database however the database that I am connecting to has a database password - I get an error message when attempting to specify the 'connect' parameter. The following is an example...
3
2660
by: Andy G | last post by:
I have some code that hits a DB2 database from my ASP.NET application. I haven't been able to exactly nail it down but my connections are not getting closed for some reason. I look at the database and it's like everytime I click a button in the ASP.NET applicaiton and it runs a database command it leaves the connection open. The DBA's are not happy with me right now. Luckily I'm still in test. Does anyone have any idea why the below...
0
1715
by: dmckenna | last post by:
I've been tasked to upgrade an old system and there's many different versions of VB code that uses MDAC to talk to MSSql. Do you know what the difference is between the two code versions? Is there problems with re-opening connections all the time? Version 1 of the program is:
4
4271
by: T | last post by:
-------------------------------------------------------------------------------- I tried this audit trail code, using 2003 and it works great, I try and use it at work w/97 and it blows up: Compile error, user defined type not defined I assume the ADODB is the problem? How would I change / fix this to work w/97 Table called UserLog w/field UserName txt
2
6728
EYE4U
by: EYE4U | last post by:
Hi all, This is how you can connect to an Access Database using ADODB.. First add a reference to Microsoft ActiveX Data Objects 2.0 Library Now to lets Declare some variables : Private Con As New ADODB.Connection Private Rec As New ADODB.Recordset * You can set them to Public too if you want to access the Connection and Recordset in any other Form or Module.
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.