How to deploy vb.net application.

  • Thread starter Thread starter Tracey
  • Start date Start date
T

Tracey

Hi,

My winform vb.net app need to be packaged to distribute
for other people. This app has a back-end MS Access
database, and VB.net program files. In one of its
winforms, there's an OLEDBConnection connect to the
Access database. My question is how can I keep database
connection viable when deploying app?

Please help with suggestions.
 
Put it in the app.config file or something. Don't use DSNs. I assume the MDB
is on the network somewhere?

I don't quite understand what you mean by "viable".
 
I never tried deploy apps before. The thing is how can I
keep the app and database connection working without any
loss ?
 
Where is the database file? On a network share?

If that's the case then you'll have "loss" if the network flakes out on you.

If you put the connection string in the app.config file and make it point to
the database on the network you should be OK if the code works when the MDB
is opened locally.
 
The database file is in local host not network.
Can you offer me more details ?

Yes, if you tell me what you think the problem is. How are you connecting to
the database right now? Are you using a DSN or a simple connection string?
What do you mean by "loss"?

If the target computer has all the prerequisites (in your case I suppose
that's .NET and ADO/DAO) then simply copying the EXE and other files the app
requires should be enough.

But it's difficult to know since you haven't *really* asked a question =)
 
Sorry Klaus, English is not my native language.
I'm connecting database with DNS and in my program, the
code-behind file contains the connection string.
 
No problem. I just want to understand what you're trying to do so I can
actually help you =)

OK, so you say "code behind", does that mean this is an ASP.NET application
written in VB.NET?

Web applications don't need to be "deployed" unless you want to install and
run them in a different server than, say, your workstation. Is that your
case? Do you want to move it to another machine to run it from there?
 
It sounds like you have developed a VB .NET application that connects to an
Access database via ADO .NET. You want to distribute the application with
your database and have the link between the application and database work on
the various machines you are installing it onto.

If this is correct I recommend having the access database being located
where the executable will reside. Then setup your application to connect to
the database via a connection string which points to the database file in
Application.ExecutablePath. When you create your installer just place the
executable and database in the same directory, no messing around with DSN
entries.
 
Back
Top