473,763 Members | 3,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADO Connection Open fails with error -2147467259 when MS Access database under Source Safe

gm
Immediately after generating the Access application from the Source
Safe project I get:

"-2147467259 Could not use ''; file already in use."

If Access database closed and then reopened I get:

"-2147467259 The database has been place in a state by user
'Admin' on machine ..... that prevents it from being opened or
locked."

This error will then persist - even past a machine reboot and compact
and repair of both application db (without source safe removal) and
'server' db. If I remove the Access application from Source Safe
the ADO connection opens fine. (Might have to close database and
reopen it to get it working the first time after eliminating source
safe.)

I do not appear to be short on memory. Am using:

Access 2003 with sp1
Source Safe 6.0d
Windows XP Professional with sp2
Database in Access 2002-2003 format
Microsoft ActiveX Data Objects 2.7 Library

I have isolated error in test database with just one table and one
form. Test1 fails under source safe while Test2 - which avoids use
of the offending open command -works regardless of use of source safe.

Any illumination on this would be appreciated. I have found the Source
Safe & Access combination hard going but I do not want to loose source
code control. This issue has undermined my confidence in these tools
yet again. Many thanks.
GM

Option Compare Database
Option Explicit

Private Sub cmdTest1_Click( )
On Error GoTo Error_Handler

Dim cnn As ADODB.Connectio n
Dim rtbl As ADODB.Recordset
Dim lngTest As Long

Set cnn = New ADODB.Connectio n
Set rtbl = New ADODB.Recordset

lngTest = 1

' Have tried eliminating the with block - no difference. GM
With cnn
.ConnectionStri ng = CurrentProject. Connection
.Open ' This Open command fails with -2147467259 error if
application under source safe. GM
End With

'Open 'insert cursor' on test table
rtbl.Open "Table1", cnn, adOpenStatic, adLockOptimisti c, adCmdTable
With rtbl
.AddNew
!col1 = lngTest
.Update
End With

MsgBox "Test1 Inserted OK"

Exit_Sub:
On Error Resume Next
rtbl.Close
cnn.Close
Set cnn = Nothing
Set rtbl = Nothing
Exit Sub

Error_Handler:
MsgBox "An error has occured in this application. " _
& " Please contact your techincal support person and " _
& " tell them this information: " _
& vbCrLf & vbCrLf & "Error Number " & Err.Number & ", " _
& Err.Description , _
Buttons:=vbCrit ical
Resume Exit_Sub
Resume
End Sub
Private Sub cmdTest2_Click( )
On Error GoTo Error_Handler

Dim rtbl As ADODB.Recordset
Dim lngTest As Long

Set rtbl = New ADODB.Recordset
lngTest = 2

'Open 'insert cursor' on test table
rtbl.Open "Table1", CurrentProject. Connection, adOpenStatic,
adLockOptimisti c, adCmdTable
With rtbl
.AddNew
!col1 = lngTest
.Update
End With

MsgBox "Test2 Inserted OK"

Exit_Sub:
On Error Resume Next
rtbl.Close
Set rtbl = Nothing
Exit Sub

Error_Handler:
MsgBox "An error has occured in this application. " _
& " Please contact your techincal support person and " _
& " tell them this information: " _
& vbCrLf & vbCrLf & "Error Number " & Err.Number & ", " _
& Err.Description , _
Buttons:=vbCrit ical
Resume Exit_Sub
Resume

End Sub

Jan 25 '06 #1
0 7716

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

Similar topics

1
1217
by: cp | last post by:
I have a business object (c#) running on an app server that talks to my sql server 2000 (2 separate physical machines). If sql server gets restarted (i.e. someone kicks the cord out of the wall on the db server and it needs to be restarted), the connections that IIS is maintaining seem to be invalid. If someone can verify that or explain a little about how the internals of that works, that would be educational for me but I'll take it on faith...
4
1495
by: Scott B | last post by:
Can someone perhaps give me some insight as to why I am getting an OleDbexception when I try to run the following code. What I am looking to do is test if the connection could be opened and if not, then have it fall back to a seccondary connection string. However whenever I try to test the connection I get an OleDbconnection exception.... OleDbConnection m_Conn = new OleDbConnection(); m_Conn.ConnectionString = ConnString;
6
4499
by: karim | last post by:
I have an asp.net page that stopped running properly giving the error below. The app uses a SQL Server 2000 on another server. Enterprise Manager and Query analyzer on the web server can connect to that sql server just fine and run queries. I rebooted the web server and made aspnet member of the admin group. I don't know why the error mentions open connections if I can open several query anaylzer windows using the same sql server...
6
10987
by: M | last post by:
Hi, Does SqlDataAdapter always close the connection (assuming connection was closed before calling Fill()), even if an exception occurs while calling Fill()? Example: try { myDataAdapter.Fill(myDataTable);
0
1015
by: Sergey Poberezovskiy | last post by:
Hi, My VB.Net (1.1) application connects to ASP.Net (1.1) WebService that resides on ISP Server. My client successfully runs this application from 4 out of 5 PCs. On that one PC I receive the following error whenever I call a method of the service: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.
0
2185
by: Christopher H. Laco | last post by:
I'm in a strange situation. I have a dataset that uses it own connection string from MySettings. All is well. This thing works in .NET just dandy. If I reference this dataset from another project, and load that project under IIS6/ASP/2003 using COM, it fails with the folowing error on the FIRST request only: > Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at...
1
1414
by: Yofnik | last post by:
I am writing an application that simulates a TCP device that only accepts one connection at a time. For my application, I would like connection requests to fail if one already exists. So far I have the following code: IPAddress ip = Dns.Resolve("localhost").AddressList; Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint ep = new IPEndPoint(ip, 2323); s.Bind(ep);
29
7071
by: Bryce K. Nielsen | last post by:
Suddenly this week, I've started getting this error message: System.Data.SqlClient.SqlConnection(GetOpenConnection)ExecuteNonQuery requires an open and available Connection. The connection's current state is connecting. I'm very puzzled since I'm not calling "ExecuteNonQuery" and I am calling "Open", which I've always assumed was Synchronous, i.e. would not return until either A) the connection was open or B) there was an error. Here...
6
3592
by: Bjoern Schliessmann | last post by:
Hello, I'm currently trying to implement a simulation program with Kamaelia and need a reliable TCP connection to a data server. From Twisted, I know that a method is called if the connection fails by whatever reason. I tried to get the same results with Kamaelia's TCPClient component. If I start up the component and try to connect to a closed TCP port it fails and sends a message out of the signal box, that's okay.
5
13044
by: chrispoliquin | last post by:
Hi, I have a small Python script to fetch some pages from the internet. There are a lot of pages and I am looping through them and then downloading the page using urlretrieve() in the urllib module. The problem is that after 110 pages or so the script sort of hangs and then I get the following traceback: Traceback (most recent call last):
0
9563
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
10145
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
9998
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...
0
9822
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
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
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
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
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.