Forum Statistics
- Forum Members:
- Total Threads:
- Total Posts: 5
There are 1 users currently browsing forums.
|
 |

05-20-2009, 04:09 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
Connection Strings
Please Register to Remove these Ads
I have split my database into a front end and a back end. I used the tool that is given via access 2007. After the split my be database is no longer encripted. I re-opened it exclusive and password protected it. However now when I open my "Front End" I get password is invalid. I am pretty sure it is because I don't have a connection string. I have never worked with connection strings, therefore don't really know where to begin. I do however have the string I need. I just don't know where to put it.
Code:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database Password=MyDbPassword;
I got this string from Here.
My main question is where does this string go?
Thanks in advance for any time spent helping me attempt to solve my issue. I wasn't sure if this should go in Programming or Tables and Databases, as it is a bit of both. Sorry if it is in the wrong spot.
Dan
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

05-28-2009, 02:50 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
re: Connection Strings
Bump would be glad to provide more information if is needed. I am still stuck on this issue.
Thanks again,
Dan
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

05-28-2009, 07:09 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 576
|
|
|
re: Connection Strings
Hi split_atom18,
I've never worked with a connection string before either, but hey, the worse that could happen is you just delete what I suggest. 
First, you'll need a module (or create one) to put a Sub into.
Here's an example Sub I found in a book:
Code:
Public Sub Reconnect()
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
cnn.ConnectionString = _
"Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=C:\myFolder\myAccess2007file.accdb;" & _
"Jet OLEDB:Database Password=MyDbPassword;"
cnn.Open
Debug.Print cnn.ConnectionString
Set cnn = Nothing
End Sub
Modify that example as required for your path & password, then you can try running "Reconnect" in the immediate window to see if it works. If it does, you can then remove the Debug line.
After that, if you have a form (or switchboard) that opens when you start your database, you can just put "Reconnect" in the Form_Open property.
Let me know how that goes.
Cheers,
__________________
Docendo discimus.
Last edited by ConneXionLost; 05-30-2009 at 12:51 AM.
|

06-01-2009, 12:46 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
re: Connection Strings
Will try and give it a go today, thanks again for your help. Will let you know how it went.
Thanks,
Dan
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

06-02-2009, 02:07 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
Re: Connection Strings
It isn't recognizing "ADODB.Connection" as valid. So far it isn't working, but I am still playing with it. Just wanted to give you a brief update.
Thanks again,
Dan
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|