By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,183 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,183 IT Pros & Developers. It's quick & easy.

Problem with opening a database, VB 2010 and Access 2007!!

P: 1

i am programming in vb 2010, and i tried to connect vb 2010 with access 2007 base with this code:

Expand|Select|Wrap|Line Numbers
  1.         Dim dbBaza As String
  2.         Dim putanja As String
  4.         putanja = GetAppPath()
  6.         dbBaza = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & putanja & "Baza.accdb"
  7.         TextBox1.Text = dbBaza
  8.         dbKonekcija = New OleDbConnection(dbBaza)
  9.         dbKonekcija.Open()
but it, when come to debuging, says 'It is unregnogized database'. if i change database made in access XP, it works normally.

does anyone knows what is happening?
Aug 15 '11 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,295
Im not sure that GetAppPath will return a back slash at the end of it;


... putanja & "\Baza.accdb"
Aug 16 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.