944,147 Members | Top Members by Rank

Ad:
Oct 16th, 2009
0

Database Connection Problem

Expand Post »
i have created a database for subscriptions in MS Access 2007. I want to link it with my forms using the code below but its saying unrecognised database format.

Dim conn As Connection
Set conn = New Connection
conn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\subscriptions2.mdb".......


Now i have converted it to Access 2000 format and it wont work. I have also converted to acces 2002-2003 but it doesnt work either. i wanted to convert it to Access 97 format but that option is not there on Save As in Access.
Can anyone help because i cant link with the database.
Thank You
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Israelsimba is offline Offline
41 posts
since Oct 2009
Oct 16th, 2009
0
Re: Database Connection Problem
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Oct 17th, 2009
0
Re: Database Connection Problem
install service pack 6 for vb6.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Oct 22nd, 2009
0
Re: Database Connection Problem
have you any problem more? if not please solve it.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Oct 22nd, 2009
0
Re: Database Connection Problem
Try to change your Provider ,., try to use Microsoft Jet 4.0,.I think it's the latest version..,if there are available service packs on their site...,download it and install it on your machine...My MS Access version is 2003, and my programs works smoothly in both 3.51 and 4.0....

[...Just trying to help...]
Reputation Points: 14
Solved Threads: 14
Junior Poster in Training
PoisonedHeart is offline Offline
57 posts
since Jul 2009
Oct 28th, 2009
0
Re: Database Connection Problem
If u import ur database in msaccsess them u meight this problum
to solve this problem fllow the fllowing steps
1.open ur project
2. Create a new data base
3. Close ur project
4. Open the data base
5. Now import ur table
6. Now u can found ur error is solved
Reputation Points: 10
Solved Threads: 0
Newbie Poster
VINOD_2553 is offline Offline
10 posts
since Oct 2009
Oct 31st, 2009
0
Re: Database Connection Problem
Your connection string is faulty. You need to declare the connection first.

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim conn As ADODB.Connection
  2. Set conn = New ADODB.Connection
  3. conn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\subscriptions2.mdb"
  4. 'Ensure that you have referenced MS ActiveX Data Objects Library in Project/Refrences.
  5. 'You can also use Jet 4.0 as below
  6.  
  7. conn.Open "PROVIDER= Microsoft.Jet.OLEDB.4.0;persist security info=false;data source = C:\subscriptions2.mdb"

I hope this solves your problem.
Reputation Points: 329
Solved Threads: 347
Senior Poster
AndreRet is offline Offline
3,700 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: creating lottery interface
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Sending data from winform to website ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC