New topic: Microsoft Access 2007 (accdb) connection string
<http://forums.realsoftware.com/viewtopic.php?t=28743> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message eugenedakin Post subject: Microsoft Access 2007 (accdb) connection stringPosted: Sat Jun 27, 2009 8:31 pm Joined: Mon Jan 02, 2006 11:43 am Posts: 10 Location: Houston, Texas Hi everyone, Well, a customer would like to use their access 2007 database, and would like me to write a secure front-end. I have worked a great deal with Microsoft Access 2003 and Realbasic and have not encontered any problems. However, with Microsoft Access 2007 I am unable to configure the connection string. Here is the code up to the connection string: Dim adodbConnection as new OLEObject( "ADODB.Connection" ) Dim adodbCommand as new OLEObject( "ADODB.Command" ) Dim connectionString as string connectionString = "DRIVER={Microsoft Access Driver (*.accdb)};" connectionString = connectionString + "DBQ=Projects.accdb;" connectionString = connectionString + "UID=;PWD=;" adodbConnection.Open( connectionString ) The error that I am getting is as follows: FrmMain UpdateListboxMDB Error Exception code 0: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, (failed on "open"). I am hoping that someone can see my mistake (I have been looking at the code for too long ). This is on a Windows Vista, REALbasic 2009 r2.1 Studio Edition system. Thanks for your help, Eugene eugenedakin at hotmail dot com Top timhare Post subject: Re: Microsoft Access 2007 (accdb) connection stringPosted: Sat Jun 27, 2009 8:56 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 5756 Location: Portland, OR USA You're using a relative path for the db file. Is it in the same directory as your executable? And remember, when you Run in debug mode from the IDE, you run in a subfolder, not in the folder where your project is. Tim Top eugenedakin Post subject: Re: Microsoft Access 2007 (accdb) connection stringPosted: Sat Jun 27, 2009 9:45 pm Joined: Mon Jan 02, 2006 11:43 am Posts: 10 Location: Houston, Texas Hi Tim, Great idea. I do have the database in the same directory as my executable (thanks for checking ). On a similar note, I added the file path directories to the file name. Unfortunately, the same error shows up (thanks for trying!). Does anyone have any other potential helpful suggestions? Thanks for providing suggestions Tim, Eugene Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml rbforumnotifier@monkeybreadsoftware.de