Showing posts with label applications. Show all posts
Showing posts with label applications. Show all posts

Friday, March 30, 2012

how can I connect to .MDF through 2 applications?

Here is the big problem:

    I am using ASP.NET 2.0 login control. this control connect to ASPNET.MDF database.I built another application using windows service, and this application also connects to ASPNET.MDF database.

problem is that the first application that connects to the database, locks the database, and so the other application cannot use the database untill the other application is closed.

I am going on circles about this, and just don't know what to do.

Please please please. love me do.Big Smile

I don't think you can use the membership database for none Asp.net application because a console application is not Asp.net application, but if you could maybe you should create one for each application as the link below from a Microsoft security forum. The reason is by default every application uses the same application name to access the database so why not create one for each application so it is clean. Post again if you still have question. Hope this helps.

http://aspalliance.com/groups/microsoft_public_dotnet_framework_aspnet_security/ng-645637_Membership_Database_Security.aspx

sql

Monday, March 19, 2012

How can client applications know if a table has been changed by another user?

Is there a mechanism in SQL Server 2000 for notifying client apps in a
multiuser setting when a change has occurred in a table (notification
event).
And/Or, is there a way a client application can 'ask' if a table has
changed?
Thanks,
WykDo you want to know whether that table design is changed or records are
added?
Madhivanan|||In both the cases you have to create your own extensions
to handle the requirement.
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1109581918.952377.73540@.z14g2000cwz.googlegroups.com...
> Do you want to know whether that table design is changed or records are
> added?
> Madhivanan
>|||It seems like you are describing an optimistic locking strategy. SQL
Server provides a ROWVERSION datatype (also called TIMESTAMP) to track
changes to a row. The client retrieves the data, including timestamp
and then, immediately before saving a change or performing other
actions, the retrieved timestamp is compared to the current one in the
table to determine if the data has changed.
David Portas
SQL Server MVP
--|||> ...The client retrieves the data, including timestamp
> and then, immediately before saving a change or performing other
> actions, the retrieved timestamp is compared to the current one in the
> table to determine if the data has changed.
Or, in the UPDATE, you include the buffered rowversion value in the WHERE cl
ause (with the primary
key value). If the update modifies zero rows, you know that either the row w
as deleted or it was
updated.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1109586059.793247.265620@.f14g2000cwb.googlegroups.com...
> It seems like you are describing an optimistic locking strategy. SQL
> Server provides a ROWVERSION datatype (also called TIMESTAMP) to track
> changes to a row. The client retrieves the data, including timestamp
> and then, immediately before saving a change or performing other
> actions, the retrieved timestamp is compared to the current one in the
> table to determine if the data has changed.
> --
> David Portas
> SQL Server MVP
> --
>|||LOL. First time I noticed your signature, Joe, I thought that SQLNS referred
to the SQL-NS API with
which you can re-use dialogs from EM in your client app. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Joe Webb" <joew@.webbtechsolutions.com> wrote in message
news:uT5aNdaHFHA.3108@.tk2msftngp13.phx.gbl...
> If you're asking about a way in which a client application can be notified
of new or even updated
> records on the server, then you may want to check out Notification Service
s. The provided Realtor
> sample provides a simple example.
>
> HTH...
> Joe Webb
> SQL Server MVP
> ~~~
> Get up to speed quickly with SQLNS
> http://www.amazon.com/exec/obidos/t...il/-/0972688811
>
>
> Tibor Karaszi wrote:

How can client applications know if a table has been changed

If you're asking about a way in which a client application can be
notified of new or even updated records on the server, then you may want
to check out Notification Services. The provided Realtor sample provides
a simple example.
HTH...
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/t...il/-/0972688811
Tibor Karaszi wrote:
>
> Or, in the UPDATE, you include the buffered rowversion value in the WHERE
clause (with the primary
> key value). If the update modifies zero rows, you know that either the row
was deleted or it was
> updated.
>LOL!!! :)
HTH...
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/t...il/-/0972688811
Tibor Karaszi wrote:
> LOL. First time I noticed your signature, Joe, I thought that SQLNS referr
ed to the SQL-NS API with
> which you can re-use dialogs from EM in your client app. :-)
>