|
-
Sep 11th, 2006, 12:04 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Connection String
Connection String
VB Code:
Connects.Provider = "Microsoft.jet.oledb.4.0"
Connects.Properties("Jet OLEDB:database Password").Value = Trim(Softpassword)
Connects.ConnectionString = "data source=" & Dr + Software
I get this On Debug
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Layout\Lay.Mdb;Jet OLEDB atabase Password=13241"
Then When I do a
Connects.Open
I get this "Data Source=C:\Layout\Lay.Mdb"
And A error Not a Database Format
Any Ideas
Last edited by Dbee; Sep 11th, 2006 at 12:07 AM.
Don
(OLD DOS Programmer)
-
Sep 11th, 2006, 04:14 AM
#2
Re: Connection String
Maybe the database file has been corrupted, can you open it with access?
Jorge
"The dark side clouds everything. Impossible to see the future is."
-
Sep 11th, 2006, 05:40 AM
#3
Thread Starter
Hyperactive Member
Re: Connection String
This is a Working access97 database and the Compact routine says un recgonized Format'
compact routine:
VB Code:
Sub Do_Compact()
Dim JRO As New JRO.JetEngine
Dim cnnSrc As New ADODB.Connection
Dim strSource As String
Dim strDestDB As String
Dim strPassword As String
Dim iFileStart As Integer
Dim tl As Long
strPassword = Trim(Softpassword)
strSource = Dr + Software
iFileStart = InStrRev(strSource, "\", , vbTextCompare)
strDestDB = Mid$(strSource, 1, iFileStart) & "Backup of " & Mid$(strSource, iFileStart + 1)
JRO.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strSource & ";Jet OLEDB:Database Password=" & strPassword, _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDestDB & ";Jet OLEDB:Database Password=" & strPassword
Kill strSource
Name strDestDB As strSource
Set JRO = Nothing
End Sub
Last edited by Dbee; Sep 11th, 2006 at 05:50 AM.
Don
(OLD DOS Programmer)
-
Sep 12th, 2006, 08:02 AM
#4
Re: Connection String
Have you tried using the old provider MDAC 3.51?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|