Local or remote database

nayar

New member
Joined
Nov 2, 2009
Messages
2
Programming Experience
Beginner
hey
am making a vb.net inventory application that should contain a database so i made the database using sql compact server and made a connection at the application
but what i need the database to me included IN the application not to make a connection to it, cause i wont be installing sql server at the clients workstation , so is there a way to copy the current database into the application so i can wrap it up with, or should i create a new one and if so how ? is it by add a local database from the project

am using VS 2008
thanks
 
thanks that helped me a lot , i wanted to ask the visual studio 2008 helps connecting to the database by offering the drag and drop of table into forms, i was wondering if i want to write a connection code manually where should i do that in ma project ?
 
When you add a database to your project the IDE will prompt you to create a Data Source, including a typed DataSet. Once you've built your schema you can run the configuration wizard on that in the Data Sources window to add all your tables. You can then drag tables and/or columns straight onto your forms.

If you want to write the code yourself then where you put it is up to you. Ideally you would create a completely separate project to act as a data access layer but it's really up to you how you want to design your app. You might have separate classes dedicated to data access or you might put all the data access code into your forms. The choice is yours.
 
If you want to write the code yourself then where you put it is up to you. Ideally you would create a completely separate project to act as a data access layer but it's really up to you how you want to design your app. You might have separate classes dedicated to data access or you might put all the data access code into your forms. The choice is yours.

Just an aside, how would you go about creating a separate project to act as a data access layer? I'm working on a project that will access a db -- probably an access db on a networked computer -- from a few clients. Because there will be like 4 clients accessing the same Access db i figure I need to incorporate solid locks to prevent "collisions" and other multi-user issues. Creating a data access layer seems like a smart approach.

Would I essentially include a project in my overall solution that has classes for connecting, reading and updating data?

Sort of like this:

[Client Application Stuff] <--> [Data Access Layer] <--> [Database]

-Bill
 

Latest posts

Back
Top