Home > Archive > Visual Studio > December 2004 > Delphi Convert
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Mark A. Deal 2004-12-13, 4:09 pm |
| I've been developing in Delphi since version 1.0.
I justed picked up Visual Studio ASP.NET 2003 Architect and had a couple of
questions that I hope somebody can help with:
1. In Delphi, I can place all of my database connectivity items on a single
Datamodule unit and then refer to them from any other place in the
application. Is there a similar construct in VS?
2. What is the accepted/safest way to store connectivity settings to ADO
Connection Strings? Is it "safe" to place them in Web.Config?
3. Can anybody recommend a good third-party tool for creating menu
constructs in ASP.NET?
TIA
--
Mark A. Deal
Document & Data Solutions, LLC
http://www.docsol.com
Time Matters AIC
HotDocs Certified Consultant
GhostFill Certified Consultant
| |
| Marc Scheuner [MVP ADSI] 2004-12-14, 9:07 am |
| >1. In Delphi, I can place all of my database connectivity items on a single
>Datamodule unit and then refer to them from any other place in the
>application. Is there a similar construct in VS?
No, not out of the box. You will need to non-visually create a class
that holds all your database objects - but it's non-visual (and not
very intuitive, either!). Or you can just use a regular Windows form,
and just keep it hidden (again - rather kludgy.......)
>2. What is the accepted/safest way to store connectivity settings to ADO
>Connection Strings? Is it "safe" to place them in Web.Config?
Since connection strings are something that rarely changes (and most
definitely not during runtime), yes, you could place them in the
web.config file. You might want to not store the whole string, though,
but only the DB server name and database name (for instance). And I'd
definitely recommend *NOT* storing user names and passwords in
web.config!
Marc
========================================
========================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
| |
| Mark A. Deal 2004-12-14, 4:09 pm |
| Thank you. So, what is the accepted way to store the connection string user
names and passwords?
Thanks!
--
Mark A. Deal
Document & Data Solutions, LLC
http://www.docsol.com
Time Matters AIC
HotDocs Certified Consultant
GhostFill Certified Consultant
> Since connection strings are something that rarely changes (and most
> definitely not during runtime), yes, you could place them in the
> web.config file. You might want to not store the whole string, though,
> but only the DB server name and database name (for instance). And I'd
> definitely recommend *NOT* storing user names and passwords in
> web.config!
>
> Marc
> ========================================
========================
> Marc Scheuner May The Source Be With You!
> Bern, Switzerland m.scheuner(at)inova.ch
| |
| Marc Scheuner [MVP ADSI] 2004-12-15, 8:57 am |
| >Thank you. So, what is the accepted way to store the connection string user
>names and passwords?
Don't - ask the user for the server / database he wants to use, and
prompt for user name / password.
If you absolutely have to store these things, either store them
system-wide in web.config or the app's config file (preferably as
little info as possible, e.g. only server and DB name), or on a
per-user basis in the user's "isolated storage" - read up the MSDN
docs on isolated storage.
Marc
========================================
========================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
|
|
|
|
|