Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Monday, March 19, 2012

.sdf deployment problem VS2005

I have .sdf and .xds objects in my project for a PocketPC 2003 device. When I debug all of the CF2.0, SQL, and .SDF files are downloaded to the device. However, when I install via the application.cab file, the .sdf, .xds, and CF files do not show up on the device.

What am I missing here?

First ensure that your SDF has Build Action set to 'Content' and Copy to Output Directory = True in your project. When you then create a Smart Device Setup Project in VS2005 to create the CAB file for deployment, you need to include the project output AND the content files from your project in the setup project.

Darren

|||

After installing the CF, SQL and application cabs the .sdf file is in the correct folder. However, I am unable to open the .sdf via the application or SQLce Query Analyzer. I get the following message:

Error:0x80004005 E_FAIL

Native Error: (25039)

Description : Access to the database file is not allowe, {,,,File name,,]

Interface defining error: IID_IDBInitialize

Param. 0:0

Param. 1:0

Param. 2:0

Param. 3 \Program Files\Myapplication folder\myapplication.sdf

Param. 4:

Param.

I am still missing something. What?

|||I think I found the problem(s). A) On the device I removed SQLClient2.0. B) In VS I rebuilt .sdf and .xsd. Now it works. I think the .sdf that I replace in VS was based on CF1.0|||

cool. thanks for posting your solution.

-Darren

Tuesday, March 6, 2012

.NET assembly

Can I reference a .NET assembly in MS-SQL 2005 Workgroup like we do with COM
objects
Thanks"Julio Delgado" <jdelgado89@.hotmail.com> wrote in message
news:u%23ll%23BhwGHA.888@.TK2MSFTNGP02.phx.gbl...
> Can I reference a .NET assembly in MS-SQL 2005 Workgroup like we do with
> COM objects
Yes CLR integration is available in every edition of SQL Server 2005. But
.NET isn't COM, and the procedure is different. You need to install the all
required assemblies in SQL with CREATE ASSEMBLY (or let Visual Studio do it
for you). Then surface specially written .NET methods as a clr stored
procedures or functions.
Programming SQL Server 2005 Using the .NET Framework
http://msdn.microsoft.com/sql/learning/prog/clr/default.aspx
David

Thursday, February 16, 2012

**find related objects**

Hi
I'm working with SQL 2000, how can I find login name L1 is the owner of
which objects() in which dbs?in other word, when I want to delete a login
name in login list an error appears with the context of "you can n't
delete it because it's owns some objects in some DBs".
any help would be grateful
Try this one
CREATE FUNCTION dbo.RoleCheckUser
(
@.UserName sysname,
@.RoleName sysname
)
RETURNS BIT
AS
BEGIN
DECLARE @.RetVal BIT
SET @.RetVal = 0
SELECT @.RetVal = 1
WHERE EXISTS
(
SELECT *
FROM sysmembers membs
JOIN sysusers users on membs.memberuid = users.uid
JOIN sysusers groups on membs.groupuid = groups.uid
WHERE
users.name = @.UserName
AND groups.name = @.RoleName
)
RETURN @.RetVal
END
GO
-- Syntax to use the created function
SELECT dbo.RoleCheckUser('dbo', 'db_owner')
G
<R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000, how can I find login name L1 is the owner of
> which objects() in which dbs?in other word, when I want to delete a login
> name in login list an error appears with the context of "you can n't
> delete it because it's owns some objects in some DBs".
> any help would be grateful
|||Thanks for your reply, but let me explain my question in another way,
I want a list which shows me L1 had created which objects for example:
L1:
DB1 View1
DB1 table41
DB2View2
DB2View3
DB2Storeprocedure1
then I can go to those databases and I can change the owner of each object
and finally be able to delete th L1 completey.
I would be grateful if you could help me.
On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:

> Try this one
> CREATE FUNCTION dbo.RoleCheckUser
> (
> @.UserName sysname,
> @.RoleName sysname
> )
> RETURNS BIT
> AS
> BEGIN
> DECLARE @.RetVal BIT
> SET @.RetVal = 0
> SELECT @.RetVal = 1
> WHERE EXISTS
> (
> SELECT *
> FROM sysmembers membs
> JOIN sysusers users on membs.memberuid = users.uid
> JOIN sysusers groups on membs.groupuid = groups.uid
> WHERE
> users.name = @.UserName
> AND groups.name = @.RoleName
> )
> RETURN @.RetVal
> END
> GO
> -- Syntax to use the created function
> SELECT dbo.RoleCheckUser('dbo', 'db_owner')
> G
>
> <R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
>
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|||You can query sysobjects in a database to find all objects
owned by a user - something like:
SELECT name, xtype
FROM sysobjects
WHERE uid = user_id('YourUser')
-Sue
On Mon, 20 Feb 2006 08:18:40 +0330, R-M <R> wrote:
[vbcol=seagreen]
>Thanks for your reply, but let me explain my question in another way,
>I want a list which shows me L1 had created which objects for example:
>L1:
>--
>DB1 View1
>DB1 table41
>DB2View2
>DB2View3
>DB2Storeprocedure1
>then I can go to those databases and I can change the owner of each object
>and finally be able to delete th L1 completey.
>I would be grateful if you could help me.
>On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:

**find related objects**

Hi
I'm working with SQL 2000, how can I find login name L1 is the owner of
which objects() in which dbs?in other word, when I want to delete a login
name in login list an error appears with the context of "you can n't
delete it because it's owns some objects in some DBs".
any help would be gratefulTry this one
CREATE FUNCTION dbo.RoleCheckUser
(
@.UserName sysname,
@.RoleName sysname
)
RETURNS BIT
AS
BEGIN
DECLARE @.RetVal BIT
SET @.RetVal = 0
SELECT @.RetVal = 1
WHERE EXISTS
(
SELECT *
FROM sysmembers membs
JOIN sysusers users on membs.memberuid = users.uid
JOIN sysusers groups on membs.groupuid = groups.uid
WHERE
users.name = @.UserName
AND groups.name = @.RoleName
)
RETURN @.RetVal
END
GO
-- Syntax to use the created function
SELECT dbo.RoleCheckUser('dbo', 'db_owner')
G
<R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000, how can I find login name L1 is the owner of
> which objects() in which dbs?in other word, when I want to delete a login
> name in login list an error appears with the context of "you can n't
> delete it because it's owns some objects in some DBs".
> any help would be grateful|||Thanks for your reply, but let me explain my question in another way,
I want a list which shows me L1 had created which objects for example:
L1:
--
DB1 View1
DB1 table41
DB2 View2
DB2 View3
DB2 Storeprocedure1
then I can go to those databases and I can change the owner of each object
and finally be able to delete th L1 completey.
I would be grateful if you could help me.
On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:

> Try this one
> CREATE FUNCTION dbo.RoleCheckUser
> (
> @.UserName sysname,
> @.RoleName sysname
> )
> RETURNS BIT
> AS
> BEGIN
> DECLARE @.RetVal BIT
> SET @.RetVal = 0
> SELECT @.RetVal = 1
> WHERE EXISTS
> (
> SELECT *
> FROM sysmembers membs
> JOIN sysusers users on membs.memberuid = users.uid
> JOIN sysusers groups on membs.groupuid = groups.uid
> WHERE
> users.name = @.UserName
> AND groups.name = @.RoleName
> )
> RETURN @.RetVal
> END
> GO
> -- Syntax to use the created function
> SELECT dbo.RoleCheckUser('dbo', 'db_owner')
> G
>
> <R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
>
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/|||You can query sysobjects in a database to find all objects
owned by a user - something like:
SELECT name, xtype
FROM sysobjects
WHERE uid = user_id('YourUser')
-Sue
On Mon, 20 Feb 2006 08:18:40 +0330, R-M <R> wrote:
[vbcol=seagreen]
>Thanks for your reply, but let me explain my question in another way,
>I want a list which shows me L1 had created which objects for example:
>L1:
>--
>DB1 View1
>DB1 table41
>DB2 View2
>DB2 View3
>DB2 Storeprocedure1
>then I can go to those databases and I can change the owner of each object
>and finally be able to delete th L1 completey.
>I would be grateful if you could help me.
>On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:
>

**find related objects**

Hi
I'm working with SQL 2000, how can I find login name L1 is the owner of
which objects() in which dbs?in other word, when I want to delete a login
name in login list an error appears with the context of "you can n't
delete it because it's owns some objects in some DBs".
any help would be gratefulTry this one
CREATE FUNCTION dbo.RoleCheckUser
(
@.UserName sysname,
@.RoleName sysname
)
RETURNS BIT
AS
BEGIN
DECLARE @.RetVal BIT
SET @.RetVal = 0
SELECT @.RetVal = 1
WHERE EXISTS
(
SELECT *
FROM sysmembers membs
JOIN sysusers users on membs.memberuid = users.uid
JOIN sysusers groups on membs.groupuid = groups.uid
WHERE
users.name = @.UserName
AND groups.name = @.RoleName
)
RETURN @.RetVal
END
GO
-- Syntax to use the created function
SELECT dbo.RoleCheckUser('dbo', 'db_owner')
G
<R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
> Hi
> I'm working with SQL 2000, how can I find login name L1 is the owner of
> which objects() in which dbs?in other word, when I want to delete a login
> name in login list an error appears with the context of "you can n't
> delete it because it's owns some objects in some DBs".
> any help would be grateful|||Thanks for your reply, but let me explain my question in another way,
I want a list which shows me L1 had created which objects for example:
L1:
--
DB1 View1
DB1 table41
DB2 View2
DB2 View3
DB2 Storeprocedure1
then I can go to those databases and I can change the owner of each object
and finally be able to delete th L1 completey.
I would be grateful if you could help me.
On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:
> Try this one
> CREATE FUNCTION dbo.RoleCheckUser
> (
> @.UserName sysname,
> @.RoleName sysname
> )
> RETURNS BIT
> AS
> BEGIN
> DECLARE @.RetVal BIT
> SET @.RetVal = 0
> SELECT @.RetVal = 1
> WHERE EXISTS
> (
> SELECT *
> FROM sysmembers membs
> JOIN sysusers users on membs.memberuid = users.uid
> JOIN sysusers groups on membs.groupuid = groups.uid
> WHERE
> users.name = @.UserName
> AND groups.name = @.RoleName
> )
> RETURN @.RetVal
> END
> GO
> -- Syntax to use the created function
> SELECT dbo.RoleCheckUser('dbo', 'db_owner')
> G
>
> <R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
>> Hi
>> I'm working with SQL 2000, how can I find login name L1 is the owner of
>> which objects() in which dbs?in other word, when I want to delete a
>> login
>> name in login list an error appears with the context of "you can n't
>> delete it because it's owns some objects in some DBs".
>> any help would be grateful
>
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/|||You can query sysobjects in a database to find all objects
owned by a user - something like:
SELECT name, xtype
FROM sysobjects
WHERE uid = user_id('YourUser')
-Sue
On Mon, 20 Feb 2006 08:18:40 +0330, R-M <R> wrote:
>Thanks for your reply, but let me explain my question in another way,
>I want a list which shows me L1 had created which objects for example:
>L1:
>--
>DB1 View1
>DB1 table41
>DB2 View2
>DB2 View3
>DB2 Storeprocedure1
>then I can go to those databases and I can change the owner of each object
>and finally be able to delete th L1 completey.
>I would be grateful if you could help me.
>On Sun, 19 Feb 2006 13:00:44 +0200, Uri Dimant <urid@.iscar.co.il> wrote:
>> Try this one
>> CREATE FUNCTION dbo.RoleCheckUser
>> (
>> @.UserName sysname,
>> @.RoleName sysname
>> )
>> RETURNS BIT
>> AS
>> BEGIN
>> DECLARE @.RetVal BIT
>> SET @.RetVal = 0
>> SELECT @.RetVal = 1
>> WHERE EXISTS
>> (
>> SELECT *
>> FROM sysmembers membs
>> JOIN sysusers users on membs.memberuid = users.uid
>> JOIN sysusers groups on membs.groupuid = groups.uid
>> WHERE
>> users.name = @.UserName
>> AND groups.name = @.RoleName
>> )
>> RETURN @.RetVal
>> END
>> GO
>> -- Syntax to use the created function
>> SELECT dbo.RoleCheckUser('dbo', 'db_owner')
>> G
>>
>> <R> wrote in message news:ops47uo6j3mw7tkz@.system109.parskhazar.net...
>> Hi
>> I'm working with SQL 2000, how can I find login name L1 is the owner of
>> which objects() in which dbs?in other word, when I want to delete a
>> login
>> name in login list an error appears with the context of "you can n't
>> delete it because it's owns some objects in some DBs".
>> any help would be grateful
>>