Connection to Back End Database

D

Debbie

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
 
D

Douglas J Steele

Your connection string is looking on your C: drive for both ClientDBBE.mdb
and ClientSharedSystem.mdw. Is that where they are?
 
D

Debbie

Douglas,
Yes, they are both on the C drive. And I triple checked the path
statements. Any ideas? Thank you,
Debbie

Douglas J Steele said:
Your connection string is looking on your C: drive for both ClientDBBE.mdb
and ClientSharedSystem.mdw. Is that where they are?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Debbie said:
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
 
G

George Nicholson

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,
--
George Nicholson

Remove 'Junk' from return address.

Debbie said:
Douglas,
Yes, they are both on the C drive. And I triple checked the path
statements. Any ideas? Thank you,
Debbie

Douglas J Steele said:
Your connection string is looking on your C: drive for both
ClientDBBE.mdb
and ClientSharedSystem.mdw. Is that where they are?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Debbie said:
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
 
D

Douglas J. Steele

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"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



George Nicholson said:
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,
--
George Nicholson

Remove 'Junk' from return address.

Debbie said:
Douglas,
Yes, they are both on the C drive. And I triple checked the path
statements. Any ideas? Thank you,
Debbie

Douglas J Steele said:
Your connection string is looking on your C: drive for both
ClientDBBE.mdb
and ClientSharedSystem.mdw. Is that where they are?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


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
 
D

Debbie

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top