473,805 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database Location in a Multitier Soulution

Hi there

I am just canvassing some opinions so feel free to add yours.

I mainly work with VB.Net on dynamic websites driven by Access and have more
recently been trying to introduce Business and Data layers. Most of my
projects are fairly small so the justification for the extra work is
marginal but it helps to clean up the projects and I can see the value.
However this is my issue.

By default if you add an Access database to a web project VS2005 likes to
place it within the App_Data folder which is fine if you want to use it from
within the same project. If you introduce the concept of a DataAccess layer
then how does the DataAccess layer connect to the database during
development (VS2005 needs to se the database). I assume that once the
DataAccess layer is compiled the DLL gets added to the Bin folder of the web
project so accessing the App_Data folder isn't a problem at that stage. To
make things worse during development I work against an IIS development
server running on Win2003 (set up to mirror my live hosting environment) but
my Visual Studio Projects are stored in the MyDocuments folder of my
workstation which happen to be redirected onto a different server (which is
backed up each night). If I create a solution in VS2005 the website is on
one server, any other VB projects end up on the other server and VS2005 is
on my workstation.

Obviously with an SQL project this isn't an issue as I can hit the database
from anywhere in the network.

I'm just curious as to how other web developers set up their working
environments and/or get around this problem.

Your views please.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk
Mar 17 '06 #1
4 1570
With Access, the Connection String determines the location of the database
file.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Martyn Fewtrell" <mf*******@netw orkclub.co.uk> wrote in message
news:eo******** ******@TK2MSFTN GP14.phx.gbl...
Hi there

I am just canvassing some opinions so feel free to add yours.

I mainly work with VB.Net on dynamic websites driven by Access and have
more recently been trying to introduce Business and Data layers. Most of
my projects are fairly small so the justification for the extra work is
marginal but it helps to clean up the projects and I can see the value.
However this is my issue.

By default if you add an Access database to a web project VS2005 likes to
place it within the App_Data folder which is fine if you want to use it
from within the same project. If you introduce the concept of a DataAccess
layer then how does the DataAccess layer connect to the database during
development (VS2005 needs to se the database). I assume that once the
DataAccess layer is compiled the DLL gets added to the Bin folder of the
web project so accessing the App_Data folder isn't a problem at that
stage. To make things worse during development I work against an IIS
development server running on Win2003 (set up to mirror my live hosting
environment) but my Visual Studio Projects are stored in the MyDocuments
folder of my workstation which happen to be redirected onto a different
server (which is backed up each night). If I create a solution in VS2005
the website is on one server, any other VB projects end up on the other
server and VS2005 is on my workstation.

Obviously with an SQL project this isn't an issue as I can hit the
database from anywhere in the network.

I'm just curious as to how other web developers set up their working
environments and/or get around this problem.

Your views please.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk

Mar 17 '06 #2
Really, it doesn't matter where the DB file is. What matters is the
connection string (as Kevin has pointed out). When you deploy your site, the
DB might end up somewhere completely different, so you can't rely on it
being in the App_Data folder anyway.

What you will have to do though....
When you create your data layer (I guess this will be in a separate class
library dll), you will notice that it gets its own app.config file which
also has a connection string in it. When you deploy your site, you will have
to move this connection string from the app.config into the
<connectionstri ngs> section in the web applications web.config file.
Will

"Martyn Fewtrell" <mf*******@netw orkclub.co.uk> wrote in message
news:eo******** ******@TK2MSFTN GP14.phx.gbl...
Hi there

I am just canvassing some opinions so feel free to add yours.

I mainly work with VB.Net on dynamic websites driven by Access and have
more recently been trying to introduce Business and Data layers. Most of
my projects are fairly small so the justification for the extra work is
marginal but it helps to clean up the projects and I can see the value.
However this is my issue.

By default if you add an Access database to a web project VS2005 likes to
place it within the App_Data folder which is fine if you want to use it
from within the same project. If you introduce the concept of a DataAccess
layer then how does the DataAccess layer connect to the database during
development (VS2005 needs to se the database). I assume that once the
DataAccess layer is compiled the DLL gets added to the Bin folder of the
web project so accessing the App_Data folder isn't a problem at that
stage. To make things worse during development I work against an IIS
development server running on Win2003 (set up to mirror my live hosting
environment) but my Visual Studio Projects are stored in the MyDocuments
folder of my workstation which happen to be redirected onto a different
server (which is backed up each night). If I create a solution in VS2005
the website is on one server, any other VB projects end up on the other
server and VS2005 is on my workstation.

Obviously with an SQL project this isn't an issue as I can hit the
database from anywhere in the network.

I'm just curious as to how other web developers set up their working
environments and/or get around this problem.

Your views please.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk

Mar 17 '06 #3
Thanks for both replies.

I am aware that the connection string defines (or at least points to) the
location of the database. Currently I have the live database located on a
folder on the web server, with a duplicate database on the same relative
path on the workstation. i.e. two copies of the database . When working
within VS2005 all the design time functions work as it hits the database on
the workstation and when I test the project it still works as the project on
the web server hits the real database at the same relative path on the web
server and I don't need to rewrite the connection string. Its just all a bit
messy having two copies of the database and thought there might be a better
option.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk

"Martyn Fewtrell" <mf*******@netw orkclub.co.uk> wrote in message
news:eo******** ******@TK2MSFTN GP14.phx.gbl...
Hi there

I am just canvassing some opinions so feel free to add yours.

I mainly work with VB.Net on dynamic websites driven by Access and have
more recently been trying to introduce Business and Data layers. Most of
my projects are fairly small so the justification for the extra work is
marginal but it helps to clean up the projects and I can see the value.
However this is my issue.

By default if you add an Access database to a web project VS2005 likes to
place it within the App_Data folder which is fine if you want to use it
from within the same project. If you introduce the concept of a DataAccess
layer then how does the DataAccess layer connect to the database during
development (VS2005 needs to se the database). I assume that once the
DataAccess layer is compiled the DLL gets added to the Bin folder of the
web project so accessing the App_Data folder isn't a problem at that
stage. To make things worse during development I work against an IIS
development server running on Win2003 (set up to mirror my live hosting
environment) but my Visual Studio Projects are stored in the MyDocuments
folder of my workstation which happen to be redirected onto a different
server (which is backed up each night). If I create a solution in VS2005
the website is on one server, any other VB projects end up on the other
server and VS2005 is on my workstation.

Obviously with an SQL project this isn't an issue as I can hit the
database from anywhere in the network.

I'm just curious as to how other web developers set up their working
environments and/or get around this problem.

Your views please.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk

Mar 17 '06 #4
Perhaps using an absolute path would be better?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Martyn Fewtrell" <mf*******@netw orkclub.co.uk> wrote in message
news:ek******** ******@TK2MSFTN GP11.phx.gbl...
Thanks for both replies.

I am aware that the connection string defines (or at least points to) the
location of the database. Currently I have the live database located on a
folder on the web server, with a duplicate database on the same relative
path on the workstation. i.e. two copies of the database . When working
within VS2005 all the design time functions work as it hits the database
on the workstation and when I test the project it still works as the
project on the web server hits the real database at the same relative path
on the web server and I don't need to rewrite the connection string. Its
just all a bit messy having two copies of the database and thought there
might be a better option.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk

"Martyn Fewtrell" <mf*******@netw orkclub.co.uk> wrote in message
news:eo******** ******@TK2MSFTN GP14.phx.gbl...
Hi there

I am just canvassing some opinions so feel free to add yours.

I mainly work with VB.Net on dynamic websites driven by Access and have
more recently been trying to introduce Business and Data layers. Most of
my projects are fairly small so the justification for the extra work is
marginal but it helps to clean up the projects and I can see the value.
However this is my issue.

By default if you add an Access database to a web project VS2005 likes to
place it within the App_Data folder which is fine if you want to use it
from within the same project. If you introduce the concept of a
DataAccess layer then how does the DataAccess layer connect to the
database during development (VS2005 needs to se the database). I assume
that once the DataAccess layer is compiled the DLL gets added to the Bin
folder of the web project so accessing the App_Data folder isn't a
problem at that stage. To make things worse during development I work
against an IIS development server running on Win2003 (set up to mirror my
live hosting environment) but my Visual Studio Projects are stored in the
MyDocuments folder of my workstation which happen to be redirected onto a
different server (which is backed up each night). If I create a solution
in VS2005 the website is on one server, any other VB projects end up on
the other server and VS2005 is on my workstation.

Obviously with an SQL project this isn't an issue as I can hit the
database from anywhere in the network.

I'm just curious as to how other web developers set up their working
environments and/or get around this problem.

Your views please.

Martyn Fewtrell
mf*******@netwo rkclub.co.uk


Mar 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3343
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96653/create_ps.htm#66206 Still i give the steps i followed. Preparing the Primary Database for Standby Database Creation
9
4779
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and DataSet; and all I'm doing is showing one record in text fields, allowing the user to modify the text fields, and then updating the database again when the user clicks the Save button. The fields already show the correct data record since I have...
1
4916
by: cantonarv | last post by:
Just trying to do a basic crystal report and viewing it with dynamic sql server database but dont no what i'm doing wrong? I am using integrated security. Dim myRpt As crpt1 = New crpt1 'Where crpt1 is an existing crystal report 'set databse interaction with crystal Crystalviewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName =
3
1002
by: Dikkuuhh | last post by:
Hi, I have a database with lots of information about a person, like his address etc. Now i have that information stored in 3 datasets i must get these 3 into a XMLHTTP... This part is what i don`t get. I`ll try to use AJAX for this webapplication, but who can i do these things??
3
2617
by: pooba53 | last post by:
I have a VB .NET 2003 application that communicates with an Access db. I am deploying the application using the Wizard that creates an install package and it IS properly grabbing the Access db and putting it in the Program Files directory along with the application executable, no problem. The problem is this... The OleDbConnection knows of the database in an absolute location (i.e. C:\Documents and Settings\ApplicationDB\data.mdb
2
3983
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database Buildfile: build.xml env-user: prop-user: set-user:
5
1168
by: Jonathan Wood | last post by:
I have a Web application. Initially, I created a database in the App_Data folder and then attached it to SQL Servero 2005 (not SQL Server Express). I realize now that this is now what I want. So I created a backup of the database, detached the database file, and then created a new database from the backup that is fully a part of SQL Server 2005. The new database works just fine but I'm having the following problems: 1. I can delete...
6
1589
by: Marcolino | last post by:
Hi all, I have a simple problem but I don't know which is the best way to solve it. I need to savo into a table into access DB the location and the size of a form. Is there a way to save Location and Size into a single text field, on I need 4 Field X,Y,Height and Width? If yes, how can convert Location and Size into String and then Back to a Location and Size to apply back to the form?
1
2847
by: jjkeeper | last post by:
Hi, a colleague asked me to see if it's possible to create a warehouse database for him, so things will go faster and more efficient on his end. (yes, in the midst of my annual database project...) I tried a few things, got stuck, tried to look for information on the web but to no avail. Anyway, here is the scenario. 3 main fields from tblMain: Index - P.Key Part - name of the product Location - location of the product stored in the...
0
10364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.