Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Connection to Back End Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie - 07 Dec 2005 16:36 GMT
Greetings All,
I am having a problem with my Connection string and I am fresh out of ideas.
I have a front end and back end database.  My tables are linked in the front
end but when I execute my connection I get the following error:

[Microsoft][ODBC Driver Manager] Data source can not be found and no default
driver specified.

The back end is a MS Jet 4.0 database.  Originally the database was not
split and it was working fine.  Once I split it and enabled security, this
problem occurred.  

My connection proc looks like this:

Dim OConn As ADODB.Connection
Set OConn = New ADODB.Connection

OConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  "Data Source=C:\Documents and Settings\Owner\My
Documents\DTS\DPD\ClientDB\ClientDBBE.mdb;" & _
          "Jet OLEDB:System Database=C:\Documents and
Settings\Owner\Application Data\Microsoft\Access\ClientSharedSystem.mdw;" & _
          UserID = "Debbie", Password = "3119"

In the module, the Data Source Jet OLEDB statements fit all on one line.

I double checked both path statements, database name, workgroup file name,
libraries and permissions and ownership.  I cannot figure out if this is a
connection error or a security error.   Does anyone have any ideas?  Thank
you so much.
Debbie
Douglas J Steele - 07 Dec 2005 19:01 GMT
Your connection string is looking on your C: drive for both ClientDBBE.mdb
and ClientSharedSystem.mdw. Is that where they are?

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Greetings All,
> I am having a problem with my Connection string and I am fresh out of ideas.
[quoted text clipped - 27 lines]
> you so much.
> Debbie
Debbie - 08 Dec 2005 02:33 GMT
Douglas,
Yes, they are both on the C drive.  And I triple checked the path
statements.  Any ideas?  Thank you,
Debbie

> Your connection string is looking on your C: drive for both ClientDBBE.mdb
> and ClientSharedSystem.mdw. Is that where they are?
[quoted text clipped - 34 lines]
> > you so much.
> > Debbie
George Nicholson - 08 Dec 2005 22:36 GMT
>UserID = "Debbie", Password = "3119"

I think you'll be closer if you change that to:
"UserID = Debbie; Password = 3119"

1) Debbie and 3119 do not need their own quotes (neither did any other
arguments in the preceding part of the string)
2) the phrase as a whole does need to be enclosed in quotes (just like you
have done for everything that preceded it).
3) Comma bad. Semi-colon good.

Consider assigning everything to a variable, "strConnection", and then use
OConn.Open strConnection. You can easily test the value of strConnection in
the Debug window and some concatenation errors become obvious.

HTH,
Signature

George Nicholson

Remove 'Junk' from return address.

> Douglas,
> Yes, they are both on the C drive.  And I triple checked the path
[quoted text clipped - 46 lines]
>> > you so much.
>> > Debbie
Douglas J. Steele - 08 Dec 2005 23:08 GMT
Actually, according to
http://msdn.microsoft.com/library/en-us/ado270/htm/mdrefjetprovspec.asp
there should be a space in User Id

Another good site for information on connection strings is Carl Prothman's
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet

In fact, Carl's site suggests

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
     "Data Source=C:\Documents and Settings\Owner\My
Documents\DTS\DPD\ClientDB\ClientDBBE.mdb;" & _
     "Jet OLEDB:System Database=C:\Documents and Settings\Owner\Application
Data\Microsoft\Access\ClientSharedSystem.mdw", _
      "Debbie", "3119"

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> >UserID = "Debbie", Password = "3119"
>
[quoted text clipped - 64 lines]
>>> > you so much.
>>> > Debbie
Debbie - 13 Dec 2005 02:25 GMT
Thank you both for your suggestions.  I'm getting a different error now and I
need to take what you've given me and try a few things.  Thanks again, I have
a feeling I will be writing again soon.  Take care,
Debbie

> Greetings All,
> I am having a problem with my Connection string and I am fresh out of ideas.
[quoted text clipped - 27 lines]
> you so much.
> Debbie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.