Database Connection Problem

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Oct 2009
Posts: 25
Reputation: Israelsimba is an unknown quantity at this point 
Solved Threads: 0
Israelsimba Israelsimba is offline Offline
Light Poster

Database Connection Problem

 
0
  #1
Oct 16th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 857
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 157
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark
 
0
  #2
Oct 16th, 2009
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 481
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training
 
0
  #3
Oct 17th, 2009
install service pack 6 for vb6.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 481
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training
 
0
  #4
Oct 22nd, 2009
have you any problem more? if not please solve it.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 13
Reputation: PoisonedHeart is an unknown quantity at this point 
Solved Threads: 0
PoisonedHeart PoisonedHeart is offline Offline
Newbie Poster
 
0
  #5
Oct 22nd, 2009
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...]
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: VINOD_2553 is an unknown quantity at this point 
Solved Threads: 0
VINOD_2553 VINOD_2553 is offline Offline
Newbie Poster
 
0
  #6
Oct 28th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 255
Reputation: AndreRet is an unknown quantity at this point 
Solved Threads: 37
AndreRet AndreRet is offline Offline
Posting Whiz in Training
 
0
  #7
Oct 31st, 2009
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.
Please mark questions as answered when done.

Be the ONE!!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC