Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer
Cannot connect to database from user's computer Cannot connect to database from user's computer
Cannot connect to database from user's computer
Go Back  Xtreme Visual Basic Talk > > > Cannot connect to database from user's computer


Reply
 
Thread Tools Display Modes
  #1  
Old 02-29-2012, 01:38 PM
agv agv is offline
Freshman
 
Join Date: Dec 2005
Posts: 42
Default Cannot connect to database from user's computer


I created an executable file of an application done in VB Express 2010 which connects to a Access 2010 database.
When installling the executable file at one of the user's computer, the file is installed correctly, but it fail's when trying to connect to the database. It says that Microsoft Dataengine cannot open the database. The user's computer doesn't have Access installed, does it need to be installed? or can I install a framework or application to avoid installing Access at the user's computer?
Thanks
Reply With Quote
  #2  
Old 02-29-2012, 03:08 PM
PlausiblyDamp's Avatar
PlausiblyDampCannot connect to database from user's computer PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

How are you connecting to the file? Are you using the .NEt OleDb library or some other mechanism?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 02-29-2012, 08:01 PM
CharlieMay's Avatar
CharlieMay CharlieMay is offline
Regular
 
Join Date: Sep 2009
Location: Indiana
Posts: 89
Default

You're probably going to need to download and install the proper MDAC components to the machine to allow your program access to the database.
__________________
I thought I knew what I was doing...
...And then I turned on Option Strict
Reply With Quote
  #4  
Old 03-01-2012, 07:33 AM
agv agv is offline
Freshman
 
Join Date: Dec 2005
Posts: 42
Default

I am connecting using the following connection:

Code:
Dim sqlConnection1 As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\SERVIDOR\Proyectos\Inventario equipo\Database11 2003.mdb;Persist Security Info=True")
Reply With Quote
  #5  
Old 03-01-2012, 07:44 AM
DrPunk's Avatar
DrPunkCannot connect to database from user's computer DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

Is it the spaces in the database name that's causing the problem?
__________________
There are no computers in heaven!
Reply With Quote
  #6  
Old 03-01-2012, 08:36 AM
PlausiblyDamp's Avatar
PlausiblyDampCannot connect to database from user's computer PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Is the computer that fails running a 64bit version of windows? If so this is likely to be the problem as there isn't a 64 bit version of the Access driver. You will need to set the build option for your executable to target the x86 architecture rather than x64 or AnyCpu.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #7  
Old 03-02-2012, 09:03 AM
agv agv is offline
Freshman
 
Join Date: Dec 2005
Posts: 42
Default

Quote:
Is it the spaces in the database name that's causing the problem?
I don't have access to the user's computer now to try this but I will try as soon as I have access.

Quote:
Is the computer that fails running a 64bit version of windows? If so this is likely to be the problem as there isn't a 64 bit version of the Access driver. You will need to set the build option for your executable to target the x86 architecture rather than x64 or AnyCpu.
It is a 64 bit, so this may be reason....
I tried to reach the Build menu to access the Configuration Manager but I couldn't. I tried to do it by enabling the Configuration Manager, as follows: Tools->Options->Projects and Solutions->General->Show advanced build configurations, but the build menu still doesn't appear. Can you please help me with this....
thanks
Reply With Quote
  #8  
Old 03-02-2012, 09:08 AM
DrPunk's Avatar
DrPunkCannot connect to database from user's computer DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

The build option is found in the project's properties.

Project menu -> Properties.

Compile page, Advanced Compile Options button, Target CPU is the dropdown at the bottom of the page.
__________________
There are no computers in heaven!
Reply With Quote
  #9  
Old 03-05-2012, 01:23 PM
agv agv is offline
Freshman
 
Join Date: Dec 2005
Posts: 42
Default

thanks a lot, it worked!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer Cannot connect to database from user's computer
Cannot connect to database from user's computer
Cannot connect to database from user's computer
 
Cannot connect to database from user's computer
Cannot connect to database from user's computer
 
-->