Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / July 2006

Tip: Looking for answers? Try searching our database.

Newbie Question about SQL Server 2005 Express connection...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Liam - 05 Jul 2006 12:13 GMT
Hi, I'm fairly new to this, hope you'll forgive the newbie question.

I'm trying to build an app that will be installed on up to six PCs. The app
will use a Winform UI connected to a database sitting in a shared network
folder.

I chose to use SQL Server 2005 Express Edition based on the understanding
that I could treat the .mdf file much as I would an old-fashioned Microsot
Access file - a connection string in the app would point to the central
database file, enabiling the half-dozen users to share the same data.

Problem is that I can't find a way to attach my .mdf file to my Visual
Studio 2005 project without relying on the local installation of SQL Server
Express. When this gets rolled out, it will be on a network that has no SQL
Server 2005 Express Edition software installed on it.

I chose SS2005EE because I wanted the power of SQL Server functionality
combined with the ease-of-use (and portability) of Access data files...

Is what I'm trying to do even possible? VS2005 won't let me attach to my mdf
file unless the project connects to the local instance of SS2005EE...

Help!
tommaso.gastaldi@uniroma1.it - 12 Jul 2006 20:57 GMT
Hello Liam,

I have also been struggling with this problem. I wanted to connect to
an .mdf and use it more or less like one uses an .mdb. It seems that
things are not exactly like one would like. Or at least ms is making
things more complicate than we expect. All this useless security is
only preventing us to easily get set with our work, ... and probably is
not really stopping any hacker :)

After a few days of attempts, I have found a way to connect and deal
with mdf files which seems to work. I have not tried it yet with asp
net  pages. Would you like to give it a try to see if there are
problems?

-tom

Liam ha scritto:

> Hi, I'm fairly new to this, hope you'll forgive the newbie question.
>
[quoted text clipped - 19 lines]
>
> Help!
Liam - 15 Jul 2006 15:03 GMT
Sounds interesting... what's the workaround?

(Remember that I'm not building a web app, I'm building a distributed
winform app)

Liam

> Hello Liam,
>
[quoted text clipped - 37 lines]
> >
> > Help!
tommaso.gastaldi@uniroma1.it - 15 Jul 2006 22:04 GMT
Hi Liam,

Actually the .mdf needs to be attached to a server. You cannot access
it from remote as a stand alone file.

What do you mean by distributed winform app? Do you mean you have a few
application on different computers talking among them through sockets?

As I understand it, mdf are made to work tightly with asp.net pages.
They are placed in the app_data folder within the webroot. So you
should probably forget about .mdf: in your case, it seem that a dbms
easily accessible via tcp for remote such as slqserver, mysql, oracle,
etc. would do the job....

-tom

Liam ha scritto:

> Sounds interesting... what's the workaround?
>
[quoted text clipped - 44 lines]
> > >
> > > Help!
Jim L - 17 Jul 2006 15:39 GMT
This my first attempt at deploying a distributed windows app, and I am having
similar issues with connecting to an .mdf.  I have a server where I want the
.mdf to be kept, and a few clients running the app that will need to access
the .mdf.

Tom, you said the .mdf needs to be attached to the server.  Do you mean it
needs to be permanently attached to some instance of SQL Server/SQL Express
on the server?

The app that I am working on has the .mdf included in the project (in the
bin folder) and I am attaching at run time using "attachdbfilename=..." in
the connection string.  I was planning on placing the app in a fileshare,
hoping this would make the database accessible to the clients.  Are you
saying that this method does not work in a distributed app?

Thanks
Signature

Jim L

> Hi Liam,
>
[quoted text clipped - 62 lines]
> > > >
> > > > Help!
tommaso.gastaldi@uniroma1.it - 17 Jul 2006 17:10 GMT
hi Jim,

For what I know at the moment (I may be missing some things) .mdf is
not what one who is used to the .mdb format would expect.

Somehow, it does not seem at all to have the portability we would have
wished.

When we open an mdb the engine is in the provider. But the .mdf can be
accessed only through the SQL server engine. So it seems that it must
be "attached" to the server to be accessed.

Further, for the attempts I have done, this fact seems to have some
other bothering consequences, such as the .mdf will not be open unless
it is in some specific directories which the server can access (such as
App_Data in an asp.net application folder).

One undertands the security reasons, but I find very disappointing this
kind of behavior. I expected the .mdf to be a kind of improved .mdb,
but things seem to be quite different.

The story is probably that this format is specific to address the
security problems of asp net applications.

Personally I have forget about the .mdf and - with a lot of
disappointment - turned back to the old .mdb (with all its big
problems, such as locking and so on). In any case I use a file as DBMS
only temporarily, during development, to be free to move things around
and make easily changes, before attaching to some "serious" DBMS.

If someone has some good news about .mdf, I will be happy to hear them.

-tom

Datatime Community Edition
http://cam70.sta.uniroma1.it/Community/

Jim L ha scritto:

> This my first attempt at deploying a distributed windows app, and I am having
> similar issues with connecting to an .mdf.  I have a server where I want the
[quoted text clipped - 81 lines]
> > > > >
> > > > > Help!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.