By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,248 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,248 IT Pros & Developers. It's quick & easy.

Connecting

P: n/a
Hi All,

I am using a MS-Access with VB6.0.

I wanted to open simultaneous connections on a single MDB file. how
can i achive that?

I am using the following code right now and get error if i try to open
a connection which is already open by another module.
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''
Set myConnection = New ADODB.Connection
Set myRecordset = New ADODB.Recordset
On Error GoTo perror

'open the database connection
myConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="
& "c:\rdso\cadat.mdb"
sqlStatement = "Select * from " & TestName
' get the record set and enter values
With myRecordset
.CursorType = 1
.LockType = 3
.Open sqlStatement, myConnection
End With
'''''''''''''''''''''''''''''''''''''''''''''
Please help
Ruchit Garg
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ru********@yahoo.com (ruchit garg) wrote in message news:<83*************************@posting.google.c om>...

I am using a MS-Access with VB6.0.

I wanted to open simultaneous connec-
tions on a single MDB file. how
can i achive that?


What do you intend to accomplish with multiple connections to a
file-server database such as Jet? You can open multiple Recordsets on
a single Connection -- make sure the connection object is in a
standard module and is public so it will be available where you need
it.

And, because DAO is the native language of Jet databases, I'd suggest
you use that rather than ADO, even from VB. Microsoft overhyped ADO,
as they have so many other "access methods of choice for the
foreseeable future", only to have it be, for VB, another one-release
wonder (however, it's survived three releases of Access, but still DAO
is preferrable for Jet databases) before it was forgotten in favor of
ADO.NET which is quite a different package and has quite a different
interface.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.