Re: Newbie Question about SQL Server 2005 Express connection...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
--
Jim L


"tommaso.gastaldi@xxxxxxxxxxx" wrote:

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?

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

Liam

"tommaso.gastaldi@xxxxxxxxxxx" wrote:

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.

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!




.



Relevant Pages

  • Re: Newbie Question about SQL Server 2005 Express connection...
    ... Actually the .mdf needs to be attached to a server. ... What do you mean by distributed winform app? ... mdf are made to work tightly with asp.net pages. ... Studio 2005 project without relying on the local installation of SQL Server ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Newbie Question about SQL Server 2005 Express connection...
    ... For what I know at the moment.mdf is ... When we open an mdb the engine is in the provider. ... accessed only through the SQL server engine. ... The app that I am working on has the .mdf included in the project (in the ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: How do I remove my development server log from my client site during login?
    ... Do you know where does that app get that Server List? ... You detached your mdf and ldf files from your development SQL Server environment and then you somehow copied those files to your customer's computer and attached them to their SQL Server, ...
    (microsoft.public.sqlserver.setup)
  • Re: Deployment + Vista
    ... I'm talking about the user being able to edit the server connection setting ... MSI will allow you to edit the app directory, ... function in order to put together the connection string something like: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Digging in to trace files
    ... > Ed you are probably aware that even though the server is running MTS ... > you can create a dedicated connection when you need to correct? ... However, the app uses ... to shared server by requiring a high number of concurrent sessions ALSO ...
    (comp.databases.oracle.server)