Noob needing help

luizblink182
10-17-2004, 02:44 PM
Hi, I'm creating a program but I need some help:

I created a database with visdata (ok, it ain't the best place to create a database but whatever), I created a Access 7.0 db

I'm making this program public, so I need the program to load the database in any directory

So I came up with

Data1.DatabaseName = App.Path & "\db.mdb"

but it still doesn't load the database properly it says it was unable to find the database...

and one more thing

I don't need to write anything new to the database, only edit, so I'm editing it this way:

but it doesn't seem right, any ideas??

With Data1.Recordset
On Error Resume Next
.Edit
!Interval = txtinterval
!nmcuser = txtnmcuser
!avuser = txtavuser
!iexplore = txtiexplore
!cookies = txtcookies
End With

Shurik12
10-17-2004, 04:05 PM
Hi,

As for App.Path here's a small example (ADO connection):


oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\Mydb.mdb;" & _
"User Id=admin;" & _
"Password="


Also you seem to be using DAO.
If you have a chance to
switch to ADO (see various info on this here http://www.visualbasicforum.com/showthread.php?t=39722) do so.
Another thing to remember (be it DAO or ADO) avoid using binding in VB6


Shurik.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum