By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

DB Connect with App

P: n/a
Hey Again Group,

Sorry to be a pain:(

On my App I have serveral forms All with a Database Connection, and then
Several Data Adapters.

Is this the best way to do it? i.e have a seperate DataBase Connection on
each form, or should I have one Public one?

Thanks
MCN
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Simon,

In my opinion public one, however for that you have to rearrange a big part
of your current program, I would do it when I was you with your next
application.

Cor
Nov 20 '05 #2

P: n/a
Cor,

Going on my DB load where I would like it to have 3 Databases I could choose
from (Development, Live Network, and Local Network), I was thinking it might
be better for me to have 3 Database connections that are public to use, or
am i confusing the matter now?

Thanks
Si

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uM****************@TK2MSFTNGP12.phx.gbl...
Hi Simon,

In my opinion public one, however for that you have to rearrange a big part of your current program, I would do it when I was you with your next
application.

Cor

Nov 20 '05 #3

P: n/a
Hi Simon,

Using the designer to make your database handling on your form, give you, a
great help in making all things like dataadapter and strong typed datasets.
You have seen that in your code where you changed the parameters, however
there is also a "dataset.vb" class, which is created when you generate the
dataset.

You can also make a shared class, where you do your entire database handling
that will make things easier when filling the database.

The point is how you do it; there is not one solution, at this moment I have
chosen to give the commands to that class because it is than easier to fill
the parameters, maybe I change that tomorrow again.

When you start using your shared class, you should have to make all your
update, delete, and insert, SQL strings that are difficult to make, or let
the command builder do that for you, for which is often said they are buggy
(however I think not for the way you are using the commands at this moment).

When you use your database class does it means that it makes you very free
from the (minor) problems that there are also using the designer.

My biggest problem with the designer created database handling was that I
could not make a dynamically connection string, however I showed you that
that is easy to overcome and you use it now even generic I see.

That is why my advice is not to rearrange your project yet. Wait until you
have overcome other problems, this problem is a design problem, and slightly
a performance question however very interesting when you want to save SQL
server connections in my opinion.

(I thought let me make a message William Ryan style)

:-)

Cor

Going on my DB load where I would like it to have 3 Databases I could choose from (Development, Live Network, and Local Network), I was thinking it might be better for me to have 3 Database connections that are public to use, or
am i confusing the matter now?

Thanks
Si

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uM****************@TK2MSFTNGP12.phx.gbl...
Hi Simon,

In my opinion public one, however for that you have to rearrange a big

part
of your current program, I would do it when I was you with your next
application.

Cor


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.