Re: Sqlserverce class not working when VB.Net application is running from network drive



Instead of mapping the drive to point to a different machine, does it work if you just copy everything to that machine and run it there? I really can't tell what the problem is from your description, but I'm guessing it could be a sharing violation.

--
Ginny Caughey
Device Application Development MVP


<srikumari.maddela@xxxxxxxxx> wrote in message news:fa155fa9-85c7-45af-8e9a-df3b9ad5a8bd@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jan 8, 10:59 am, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@xxxxxxxxxxxxxx> wrote:
If you don't already have a try...catch block around the SqlCeConnection
code, add that and see if you can trap exactly what the error is. Use the
debugger to see if there is any InnerException your should be aware of.

The only thing that is generally different about a network drive location
for a SSC database is that only a single connection is supported at a time.
Lack of adequate rights can also be an issue. If you're running the app from
a local machine where your app works if the sdf file is also local, then I
assume all the DLLs you need are present. But if you're actually running the
app from a network machine, then an incomplete SSC installation could also
be an issue.

--
Ginny Caughey
Device Application Development MVP

<srikumari.madd...@xxxxxxxxx> wrote in message

news:4ec87347-ba09-4fc5-9542-46ac50b14dae@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jan 7, 10:34 am, "Ginny Caughey [MVP]"





<ginny.caughey.onl...@xxxxxxxxxxxxxx> wrote:
> How do you know it is not working? Do you get any error message? Is it
> possible that the database is already in use when you attempt to connect
> to
> it on the network drive? Is the application running from the same > location
> as the database file or on a different computer?

> --
> Ginny Caughey
> Device Application Development MVP

> <srikumari.madd...@xxxxxxxxx> wrote in message

>news:7e4d0146-1d05-4b20-99c2-0c0eff427890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> >I have VB.net application which has SQL Server Compact Edition 2005
> > Database as backend. In VB.net coding i am using Sqlserverce classes
> > to connect this database. It works well when I run the application in
> > local drives. But its not working when I run the application from
> > network drives. I tried with strong names and security policies. Still
> > not working. Can anybody help me to resolve this Issue. Its urgent
> > Plzzzzzzzzz.

> > Thanks
> > Srikumari.- Hide quoted text -

> - Show quoted text -

Hi
Thanks for your reply. It gives the error
"Application has encountered a problem and needs to close. We are
sorry for the inconvenience."
1st I couldnt locate where the error exists. So I commented the code
line by line and tried to find out which line of code is causing the
problem. I gor the error at SqlCeConnection varible declaration
itself. Same case with all the Sqlce classes. I already added the
necessary references also. I commented the database connection code.
I tried only with variable declaration. This itself causing the error.
Please help me to resolve this issue.

Thnaks,
Srikumari.- Hide quoted text -

- Show quoted text -

Thanks Ginny

I tried with the try catch block. Still the error is same.
Let me explain you what I did.
On System A I installed my application. Database is also on System A's
folder where the executable is. If I run the application from System
A , it works fine and it connects to the database also.
Now I mapped the System A's folder where the application exists on to
System B. (Both the systems are in network and sharing permission is
also there.)
Now I am running the application from System B. Then that error
"Application has encountered a problem and needs to close. We are
sorry for the inconvenience."
exists.

In the code if I dont use any Sqlserverce classess then it works fine
in System B also. The error exists only when I use Sqlserverce
classess.
But those are needed to connect to the database.

Help me to solve this plz.

Thnaks,
Srikumari.

.



Relevant Pages

  • Re: Sqlserverce class not working when VB.Net application is running from network drive
    ... The issue is that if more than one app attempts to connect to a sdf file on a network share, the first app that connections opens that file with an exclusive handle so no other apps can access it. ... >> possible that the database is already in use when you attempt to ... >>> network drives. ...
    (microsoft.public.sqlserver.ce)
  • Re: Cool boat & travel computer
    ... For the "new" PCXT, the biggest FULL HEIGHT hard drive was the Tulin ... drives and 256K of RAM. ... these nice 9-track drives with bus adapter cards and drivers in Computer ... run the custom database, print perfect Meter Cards so the technicians on ...
    (rec.boats.cruising)
  • Re: Sqlserverce class not working when VB.Net application is running from network drive
    ... then an incomplete SSC installation could also ... possible that the database is already in use when you attempt to connect ... In VB.net coding i am using Sqlserverce classes ... network drives. ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL 2005 Best Practice vs SQL 2000: Application Files Separate from data (and log) files
    ... You'll not be using most of the system databases intensively so you don't need to seperate them, I mean locating them on different physical disks. ... If it's being used intensively in your environment then you should locate it's log and data files on different physical disks. ... For this question you must understand the reason why we should seperate data and log files. ... Of course these drives must be physically seperated so that you'll gain performance benefits. ...
    (microsoft.public.sqlserver.setup)
  • Re: File Corruption
    ... No one in the 3 institutions have access to their PC's hard drives. ... The "My Documents" is actually a spot on a network drive called the H ... This is probably the most common cause of corruption. ... There is never any valid excuse not to split a database. ...
    (microsoft.public.access.gettingstarted)

Loading