Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Monday, March 12, 2012

Help with "Problem generating manifest" error

Hi!

I'm using VS 2005 SP 1 on my first project with CE. I've recently run into the problem that if I do anything with my SDF file in Visual Studio I get the following error when I run the project (in debug mode from VS):

The process cannot access the file 'C:\xxx\MySDF.sdf' because it is being used by another process.

The solution is to close the project and reopen it however this is getting painful. Anyone else seen this problem?

Thanks!

This problem hasn't gone away....was hoping someone else has seen it and has a solution.

Thanks!

|||

Do you have the connection open in Server Explorer or any other place. Basically as long as there is some connection open to that database, you can not delete it. However, you can open multiple connection to the same database. We support multiple connecitons.

Thanks,

Laxmi

Help with "Problem generating manifest" error

Hi!

I'm using VS 2005 SP 1 on my first project with CE. I've recently run into the problem that if I do anything with my SDF file in Visual Studio I get the following error when I run the project (in debug mode from VS):

The process cannot access the file 'C:\xxx\MySDF.sdf' because it is being used by another process.

The solution is to close the project and reopen it however this is getting painful. Anyone else seen this problem?

Thanks!

This problem hasn't gone away....was hoping someone else has seen it and has a solution.

Thanks!

|||

Do you have the connection open in Server Explorer or any other place. Basically as long as there is some connection open to that database, you can not delete it. However, you can open multiple connection to the same database. We support multiple connecitons.

Thanks,

Laxmi

Friday, March 9, 2012

Help w/ SqlClientPermission

Hello!

I'm currently working on a project consisting in rewriting VB 6.0 applications into VS 2005 applications. I already have the form designed in VS '05 w/ the controls, and I'm connected to a SQL server 2000 database. I've also created the different data adapters and datasets, which in VS 2005, have also created BindingSources and BindingNavigators. But, when I run the project, I am getting the following error, and the form doesn't appear:

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I have been trying to find ways to get around it, but I'm not that successful. I have gone online on the Microsoft website and found a host of comments from other people, but I can't relate theirs to my problem. I understand that my program needs to be granted this permission for it to run, but I can't seem to know what and where to begin resolving it. Here's also what I've found online about how to resolve it:

To grant the required permissions to a custom assembly, follow these steps:

1. Assert permissions in your custom assembly.

2. Make the custom assembly available to your project.

3. Reference the custom assembly in your project.

4. Modify the code access security (CAS) settings for your custom assembly.

Can anyone who has encountered this kind of error tell me if these are the steps I need to take to solve it?

Also, is teh custom assembly the AssemblyInfo.vb file or is it obtained by right-clicking the project in the Solution Explorer and pointing at the properties?

Thanks very much for any help I can help.

Have a wonderful day.

This is a CAS policy which could be set at domain level and enherited by your computer. The SQLClient assembly is not rated as trusted in the domain/Area you want to run the application (either locally or over the network which is in common not allowed / trusted). YOu can see the configured permissions using the .Net Framework configuration tool.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Help w/ SQL Newbie Student

Hi,

I am working on a school project ...

I have the following schema:
<b>
DIVISION (dvname, manager)
DEPT (dname, parent-dname/parent-dvname, manager, floor#)
EMP (ename, salary, dname/dvname)
ITEM (iname, color, price, type)
SELL (dname, iname)
SUPPLY (sname, iname, dname)
</b>
Each of the first fields is the PKey.

I have to figure out the SQL for the following statement:

<b>List the items supplied by all companies that supply all items of type A.</b>

I have gotten this far, but do not understand division in SQL well enough .. I have a relational algebra solution that works ... but am having a hell of a time with a SQL solution ... Please help,

This is what I have in SQL:
SELECT SE.iname FROM SUPPLY SE WHERE NOT EXISTS
(SELECT I.iname FROM ITEM I WHERE I.type='A' AND NOT EXISTS
(SELECT S.iname FROM SUPPLY S WHERE S.iname=I.iname AND S.dname=SE.dname))

I have not work with SQL much so please help out ... I am using SQL Server if that matters ... Thanks

... I have done the frist 49 of the queries ... and they all made sense ... but this one is just bugging me ... PLEASE HELPDon't feel bad. This is not a simple task.

Some questions:
Does this have to be done in a single SELECT statement, or can it be done using a stored procedure or user-defined function that contains multiple SQL statements?

You need to list items supplied by companies, but all I see in your structure are departments and divisions. Please clarify.

Your DIVISION and DEPT tables are kind of a goofy schema, but I suppose you have no control over that?

What is the purpose of the SELL table vs the SUPPLY table? Can we ignore the SELL table?

Is a company considered to be a supplier of all type "A" items if its departments and divisions collectively supply all the items, or does it have to supply the items itself directly?

Can we ignore the EMP table? It appears to have nothing to do with the problem.

blindman|||Originally posted by blindman
Don't feel bad. This is not a simple task.

Some questions:
Does this have to be done in a single SELECT statement, or can it be done using a stored procedure or user-defined function that contains multiple SQL statements?

You need to list items supplied by companies, but all I see in your structure are departments and divisions. Please clarify.

Your DIVISION and DEPT tables are kind of a goofy schema, but I suppose you have no control over that?

What is the purpose of the SELL table vs the SUPPLY table? Can we ignore the SELL table?

Is a company considered to be a supplier of all type "A" items if its departments and divisions collectively supply all the items, or does it have to supply the items itself directly?

Can we ignore the EMP table? It appears to have nothing to do with the problem.

blindman

The assignment had 50 queries ... of all different kinds.

We have to do it in a single SELECT statement (with subqueries of course)

I do not think that an table except the SUPPLY and ITEM are needed but I dont know exactly how they interact ...|||If your answer must be a single select statement, then that eliminates any possibility of searching the departmental hierarchy, and so actually makes the problem easier.

Break your problem into parts.

If you had a list of companies (departments?) then it would be trivial to list all the products they sell, right?

So your task is to create a subquery that lists all the departments that sell all type "A" products. How do you determine if a department sells all of the type "A" products?

The most direct method would be to find Departments where the number of distinct type "A" products they sell equals the number of type "A" products that exist.

The more subtle method (which your code seems to be attempting) is to create a list of departments that DON'T sell all the type "A" items, and then find all the departments that AREN'T on that list. This is certainly a more confusing method than the product count technique, but it may have some efficient advantages for extremely large tables. I don't know. But I do know you can get a list of departments that don't sell a full line of type "A" products by using a FULL OUTER JOIN between DEPARTMENT and a list of type "A" suppliers.

blindman

Help w/ recovery please

Alright, I don't know much about SQL server, this wasnt my
project, but now I'm tasked with fixing it. Yesterday
someone ran a script that dropped a bunch of tables, so
we'd like to recover to a point just before those actions
occurred.
We have current MDF and LDF files, and a backup of both
that is dated Sept 27. The LDF file format is "simple"
and is truncated to 2MB.
Is there a way to step back through the log and undo the
actions of the script? Or do we need to restore the 9.27
copy of the database and hope that the latest LDF goes
back that far? Can someone post a link or give a brief
tutorial on how to fix this? Any help would be
appreciated.The ideal course of action would have been.
12:00 Full Database Backup
15:00 Tables dropped
15:01 You were informed
15:02 Take Transaction Log Backup
15:05 Restore database from last full backup
15:10 Restore database from Transaction Log backup and use STOPAT
14:59
How do the backups you have fit with this scenario ...?
An alternative is create a new database from the last full backup you have.
Then DTS the dropped tables from the restored DB into the Live DB.
HTH
Ryan Waight, MCDBA, MCSE
"Brad V" <anonymous@.discussions.microsoft.com> wrote in message
news:0f4e01c3a865$8d738fb0$a601280a@.phx.gbl...
> Alright, I don't know much about SQL server, this wasnt my
> project, but now I'm tasked with fixing it. Yesterday
> someone ran a script that dropped a bunch of tables, so
> we'd like to recover to a point just before those actions
> occurred.
> We have current MDF and LDF files, and a backup of both
> that is dated Sept 27. The LDF file format is "simple"
> and is truncated to 2MB.
> Is there a way to step back through the log and undo the
> actions of the script? Or do we need to restore the 9.27
> copy of the database and hope that the latest LDF goes
> back that far? Can someone post a link or give a brief
> tutorial on how to fix this? Any help would be
> appreciated.|||If you had your DB in simple mode, it means you did not
have the ability to back up your transaction log and it
was continually truncated. A production system should
ideally be set to full or bulk-logged. Because of this,
point-in-time recovery is virutally impossible.
So you could restore your Sept. 27th DB to a new DB (not
the same name), and consider it your new master. There
are third party tools to trawl through the log, but since
it has been continually truncated, it will be of no use to
you most likely.
Then I would DTS or BCP out the data from the older DB and
reinsert it into the 27th database.|||Brad
By having your log in simple mode you will not be able to
recover the data. Your backup will be of the database on
Sept 27. Unless the data you want was available then,
there is no way you can recover it.
You can not step back through the log as you do not have
the log available. If you want to be able to recover you
need the database to be in full recovery mode. In this
mode you also need to backup the transaction logs
regularly.
Even if you had done this you do not step back, you step
forward. You have to load the full backup that is the
nearest before the time and date you want. You then use
the transaction log backups to roll forward to the point
in time that you are trying to reach.
Idealy you should do a full backup at least once a day.
Frequency of transaction log backups depends on the
criticality of the data. Typically they might be anything
from a couple of times a day to every five minutes (or
occasionally even more).
Sorry there is no good news this time.
Hope this helps.
John
>--Original Message--
>Alright, I don't know much about SQL server, this wasnt
my
>project, but now I'm tasked with fixing it. Yesterday
>someone ran a script that dropped a bunch of tables, so
>we'd like to recover to a point just before those actions
>occurred.
>We have current MDF and LDF files, and a backup of both
>that is dated Sept 27. The LDF file format is "simple"
>and is truncated to 2MB.
>Is there a way to step back through the log and undo the
>actions of the script? Or do we need to restore the 9.27
>copy of the database and hope that the latest LDF goes
>back that far? Can someone post a link or give a brief
>tutorial on how to fix this? Any help would be
>appreciated.
>.
>|||> Which is unlikely because it has already reached its 2MB
> limit and been truncated.
It doesn't matter, the log option is not available as the database is in
simple recovery mode, as the other has mentioned. Your closest bet to get
*something* out of the log is some tool that can work against the log, like
www.lumigent.com log explorer. However, it is likely that the log has been
truncated anyhow (regardless of any limit on file size).
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Brad V." <anonymous@.discussions.microsoft.com> wrote in message
news:11bc01c3a872$fda2f840$a601280a@.phx.gbl...
> Ok, so I need to create a transaction log backup, restore
> the 9-27 database (probably to a new name), then apply the
> log and hope that it goes back far enough to include all
> data entered since then (stopping just before the snafu).
> Which is unlikely because it has already reached its 2MB
> limit and been truncated. (I'll have to double-check that
> it was indeed limited, and not just coincidence that its
> at 2048KB)
> Thank you all for your help, I just started learning SQL
> server last night. I'll try this when I get home from
> work.
>
> >--Original Message--
> >The ideal course of action would have been.
> > 12:00 Full Database Backup
> > 15:00 Tables dropped
> > 15:01 You were informed
> > 15:02 Take Transaction Log Backup
> > 15:05 Restore database from last full backup
> > 15:10 Restore database from Transaction Log backup
> and use STOPAT
> >14:59
> >
> >How do the backups you have fit with this scenario ...?
> >
> >An alternative is create a new database from the last
> full backup you have.
> >Then DTS the dropped tables from the restored DB into the
> Live DB.
> >
> >
> >--
> >HTH
> >Ryan Waight, MCDBA, MCSE
> >
> >"Brad V" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:0f4e01c3a865$8d738fb0$a601280a@.phx.gbl...
> >> Alright, I don't know much about SQL server, this wasnt
> my
> >> project, but now I'm tasked with fixing it. Yesterday
> >> someone ran a script that dropped a bunch of tables, so
> >> we'd like to recover to a point just before those
> actions
> >> occurred.
> >>
> >> We have current MDF and LDF files, and a backup of both
> >> that is dated Sept 27. The LDF file format is "simple"
> >> and is truncated to 2MB.
> >>
> >> Is there a way to step back through the log and undo the
> >> actions of the script? Or do we need to restore the
> 9.27
> >> copy of the database and hope that the latest LDF goes
> >> back that far? Can someone post a link or give a brief
> >> tutorial on how to fix this? Any help would be
> >> appreciated.
> >
> >
> >.
> >|||Ok, so I need to create a transaction log backup, restore
the 9-27 database (probably to a new name), then apply the
log and hope that it goes back far enough to include all
data entered since then (stopping just before the snafu).
Which is unlikely because it has already reached its 2MB
limit and been truncated. (I'll have to double-check that
it was indeed limited, and not just coincidence that its
at 2048KB)
Thank you all for your help, I just started learning SQL
server last night. I'll try this when I get home from
work.
>--Original Message--
>The ideal course of action would have been.
> 12:00 Full Database Backup
> 15:00 Tables dropped
> 15:01 You were informed
> 15:02 Take Transaction Log Backup
> 15:05 Restore database from last full backup
> 15:10 Restore database from Transaction Log backup
and use STOPAT
>14:59
>How do the backups you have fit with this scenario ...?
>An alternative is create a new database from the last
full backup you have.
>Then DTS the dropped tables from the restored DB into the
Live DB.
>
>--
>HTH
>Ryan Waight, MCDBA, MCSE
>"Brad V" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0f4e01c3a865$8d738fb0$a601280a@.phx.gbl...
>> Alright, I don't know much about SQL server, this wasnt
my
>> project, but now I'm tasked with fixing it. Yesterday
>> someone ran a script that dropped a bunch of tables, so
>> we'd like to recover to a point just before those
actions
>> occurred.
>> We have current MDF and LDF files, and a backup of both
>> that is dated Sept 27. The LDF file format is "simple"
>> and is truncated to 2MB.
>> Is there a way to step back through the log and undo the
>> actions of the script? Or do we need to restore the
9.27
>> copy of the database and hope that the latest LDF goes
>> back that far? Can someone post a link or give a brief
>> tutorial on how to fix this? Any help would be
>> appreciated.
>
>.
>