PDA

Click to See Complete Forum and Search --> : Installing a database with an application


thebug
Nov 16th, 2000, 02:36 PM
Hello everybody,
I'm pretty new in vb programming so these are my important questions:
I developed a database-based application and now I have to create a setup/install package. I used ADO to access my database and the connection string uses a dsn name instead of a filename. So, my setup program should create a user dsn on the destination machine after the program has been installed and link that dsn to the database (created with access) in the application path. How can i do this? is there an easier way to export a database in the final package and make the program still work (it still finds the database path)?
Question 2: How can i hide, or crypt my database in the final distribution and make it not-accessible with programs like Access?
Thank you very much for your help. Your site is simply the best. Bye

ender_pete
Nov 16th, 2000, 02:49 PM
to make the package the simplest way is to use the package and deploy wizard that comes with vb, it helps you detect the files you need and then you can add anymore that it didn't detect. its pretty simple to use so you shouldn't have a problem.

now as to encrypting the database, the best answer i can give you is to put user security on the database and encrypt your data..

now to encrypt your data you just need to add either a
activex encryption tool or write a encryption algorithim..
but since your new to vb your best bet is o find an activex control to do it for you... then even if your users break into the database they can't read the data because its encrypted itself and the don't have the key to decrypt it...


if you want to know where to find a control go out to cnet or lycos or anywhere that stores free file/utilities and you can probably find one in the programming section...
i put controls i write out there to benefit any other programmer who could use them.... so you don't have to pay for something you could have wrote yourself...

honeybee
Nov 17th, 2000, 08:58 PM
If you are using ADO, there is no need to use DSN to access your database. Because then you would have to create the DSN on the client's machine.

Use a DSN-less ADO connection. It works with virtually every database type. This will eliminate the need to write the routine to create a DSN.

Secondly, if you are going to put the database in the same folder as the application, i.e. in the AppPath, when you create a package for your application, include the database file (possible only if it is Access) in the files to be distributed with your application and set the destination directory for the database file as 'AppPath'.

Otherwise, include a routine in your code to create the database at the 'AppPath' location.