473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

1 New Member
Hello!

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
  3.  
  4.         putanja = GetAppPath()
  5.  
  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()
  10.  
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?
Thanx
Aug 15 '11 #1
1 1889
kadghar
1,295 Recognized Expert Top Contributor
Im not sure that GetAppPath will return a back slash at the end of it;

try

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

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

Similar topics

0
by: Daveo | last post by:
Hi there, I have created a database in A2003 and converted it to A97. When I try to open the file in A97 I get an error message saying something like it doesn't recognise the file or it's not a...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
4
by: VoodooFrog | last post by:
I am trying to run the following code as a simple test of adding an attachment through access 2007: Dim rsJob As DAO.Recordset2 Dim rsChild As DAO.Recordset2 Dim field As Field2 ...
5
by: ISUTri | last post by:
We are currently converting from Access 2003 to Access 2007. I have an Access app that is going to be very difficult to convert. This App is used by people that are out in the field and are a...
6
by: tony.abbitt | last post by:
I have recently installed Office 2007 (SP1) retaining the previous installation of Office 2003. I have converted an Access 2003 database to Access 2007. The database contains the VBA code...
1
by: transpac80 | last post by:
Problem with SQLPassthrough in Access 2007 using DAO I have this piece of VBA code from inside Access to retrieve data from external database (SQL or Oracle) sConn =...
1
kmartinenko
by: kmartinenko | last post by:
Hello all, My system was recently "upgraded" to MS Office 2007 and now I am having a really frustrating time trying to get my simple command button to open a query. This is the same database I...
11
by: julietbrown | last post by:
Either I or Access is mad! I have a table called "MAILING_TABLE" which is filled from code to create a mailing list of names and addresses. The code works fine, and after it runs the table contains...
4
by: Green831 | last post by:
Hello, I am fairly new to Access 2007 – I can make a table, queries, forms and reports but am largely doing so through the wizard function and then modifying the structure of each for my purposes. ...
1
by: titli | last post by:
Hi Group, I get error in this line :-- Set db=Currentdb Set qdfToRunFiles=db.QueryDefs("qryToRunFiles") With qryToRunFiles .Parameters("dCOB").value=dCOB-----at this line Set...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.