Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Classic Visual Basic (VB 6 or earlier) » Database Programming » Help in vb + access


Help in vb + accessExpand / Collapse
Author
Message
Posted 3/2/2008 12:03:48 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/9/2008 9:12:09 AM
Posts: 3, Visits: 3

Here I will try to explain what the problem I am facing and I am unable to solve it

Explanation

I had developed an application using VB6 and MS Access as a database.

 

 

 

i had made some forms and add a dataenvironment and some datareports.

i start with a module and made the following code to open the database

 

Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\Customer.mdb" & ";Persist Security Info=False" 

 

while make a dataenvirnment i made connection by clicking properties and

typing my path like this

 

 

I then place the folder containing project.exe and database file in other computer desktop or in c:\ or any other require location.

 

 

When i run it on another computer and click on the button which show data report report it prompt/ask me to locate/give address of

the MS Access file as show in figure and did not automatically detect the database  path 

 

 

Can you please explain the code and tell me what  I had to dot so it will automatically detect my database and don’t ask me where the database is.

 

 

 

  Post Attachments 
pic.JPG (194 views, 24.29 KB)

Post #24343
Posted 3/21/2008 10:06:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/21/2008 10:14:11 AM
Posts: 2, Visits: 3
the problem you face is in database path to solve it

you can delete all path you wright excpt database name and extention becuse as you said you put them in the same folder

BaHeR hAmEd
Baher613@yahoo.com

Post #24436
Posted 4/12/2008 5:36:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/14/2008 7:39:44 AM
Posts: 7, Visits: 140
Hi,

Check security option in Access.

if you use vb code in access , you wont have any problem.

add this line:

DoCmd.SetWarnings False

[Arash]

Post #24617
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod, Mark, Keithuk

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 3:46am