473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

mdf Files?

Hi,

I'm trying to write an application which will eventually use SQL
Express running on a server, with a client app running on several
client machines. I'm developing it with an instance of SQL Express
running on my local machine, however.

I want to use the built-in data functionality of VB.NET 2005, but how
do I set this up to work in VB.NET Express 2005 for future deployment -
or can't I? If I can't, is VB the limitation, or SQL Express?

At the minute I've pointed VB.NET to the .mdf file on the local machine
I'm developing on, but how can I deploy the app - I can't copy the .mdf
file to every client machine, I only want one copy to reside on the
database server (obviously).

Help!!!

Thanks in advance,

Stu

Jan 9 '06 #1
2 7812
Stu,

You are missing some fundamentals and some basic steps. I am not trying to
belittle you, but you have to know where are starting from.
There are many articles out there to help you on your way. I will attempt
to explain the just of it, and ask you to ask "Why" and "How" on google and
on the forums.

SQL Express, a variant of SQL Server is a windows service that allows
multiple connections to simultaneously interact with the data. A SQL
Environment may consist of multiple databases, each database is a virtual
representation of a least 2 files (MDF, LDF)

An MDF file is the primary data storage file
An LDF file is the primary transaction log file.
Additionally, you may specify additional files (For various reasons, none
that you would initially need) and they are named NDF files.

Each of these files are intended to be used solely by the SQL environment,
in fact, when SQL server is up and running, you cannot access the files.

Microsoft has enabled SQL with the uncanny ability to accept connections
from applications you write in the for of data providers. In your case, you
would most likely want to use ADO.Net 2.0 (this comes with VS 2005). More
specifically, you will want the SQLClient data provider.

I am not aware of your prowess in and around Visual Studio, and therefore
cannot assume mature. The development environment is comprised of a few
aspects. The framework, the CLR, the desired language, and a compiler.

The framework is a set of work and assemblies already completed for your
use, this allows you to avoid recreating the wheel on common, mundane, and
sometimes complex coding efforts. As an example, the framework includes
ADO.Net 2.0. This assembly knows everything that there is about one
specific task (Connecting you to your database and allowing you to interact
with the data.)

The CLR is the common runtime language, this component allows developers
from all walks of life to use the language (or a dialect thereof) of their
choice. The CLR understands the languages, and can act as the mediator
between assemblies of different languages. So that a DLL written in VB can
be called upon by C++ and C# without any special effort. The runtime is
also the piece that lights the fire under the hood of your program giving it
life when your users wish to use your application.

The environment natively supports VB, C++, and C# (I think it was created
with C# in mind). It also supports a myriad of other languages and I will
not begin to attempt to list them here.

I have provided a link that has additional reading on the subject and also a
link to sample applications.

http://msdn.microsoft.com/vbasic/dow...de/101samples/

Now, if you have gotten this far, I appreciate your patience and
understanding. To get more specific with your question, "How do I create a
database on a 'server' machine and then connect to that database from my
client application?"

Setup SQL and Database
1. Install SQL Express on the designated machine that will act as the
server.

http://msdn.microsoft.com/library/de...seoverview.asp

Setup Visual Studio
1. Install Visual Studio
1.a watch some of these webcasts from MS professionals
http://www.microsoft.com/events/webcasts/ondemand.mspx It will only cost
you time.
2. Launch Visual Studio
3. Download and Install Visual Basic Samples
(http://www.microsoft.com/downloads/i...f101samples%2f)

Review the samples in the "Data" section.
I truly hope this helps.

<st************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

I'm trying to write an application which will eventually use SQL
Express running on a server, with a client app running on several
client machines. I'm developing it with an instance of SQL Express
running on my local machine, however.

I want to use the built-in data functionality of VB.NET 2005, but how
do I set this up to work in VB.NET Express 2005 for future deployment -
or can't I? If I can't, is VB the limitation, or SQL Express?

At the minute I've pointed VB.NET to the .mdf file on the local machine
I'm developing on, but how can I deploy the app - I can't copy the .mdf
file to every client machine, I only want one copy to reside on the
database server (obviously).

Help!!!

Thanks in advance,

Stu

Jan 10 '06 #2
Thanks for your help.

I sorted out the problem - a glitch in VB.NET 2005 Express was only
letting me create a connection string via selecting an .mdf file. I
managed to work round this and can now specify remote connection
strings no problem.

Jan 11 '06 #3

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

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
2
by: Chocolade | last post by:
I have a console application project wich inside im creating array of jpg files from a directory and then im formating the files and make new files and i want to reneame/move/copy the new files with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.