Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Tuesday, March 20, 2012

Changing table owner

Hi- apologies for asking a stupid newbie question, but I'm really stuck at
the moment. I need to change table ownership.

I've got an asp script which is looking for a table owned by the dbo role,
however the table was created under a different ownership. I understand the
problem, and almost understand the solution, but I can't seem to get all the
way.

THE PROBLEM (using [server].[database].[owner].[table])
[mgbsvr1].[dnn].[dnnadmin].[aspsearch]
needs to be
[mgbsvr1].[dnn].[dbo].[aspsearch]

I looked up the books online and found this syntax:
sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'

But I can't see how to use it, nor more importantly, where I should use it.
It won't work in the query tool in Enterprise Manager. If I need to create a
script (which I've never done before), how do I execute the script?

All help deeply appreciated
Manning, SydneyHi

You will need to be connected to [mgbsvr1].[dnn] with either sysadmin,
db_ddladmin and db_securityadmin rights or the dbo to issue the statement

sp_changeobjectowner '[dnnadmin].[aspsearch]' , 'dbo'

John

"Manning" <manning@.NOSPAMbartlett.net> wrote in message
news:blcb0l$vk1$1@.lust.ihug.co.nz...
> Hi- apologies for asking a stupid newbie question, but I'm really stuck at
> the moment. I need to change table ownership.
> I've got an asp script which is looking for a table owned by the dbo role,
> however the table was created under a different ownership. I understand
the
> problem, and almost understand the solution, but I can't seem to get all
the
> way.
> THE PROBLEM (using [server].[database].[owner].[table])
> [mgbsvr1].[dnn].[dnnadmin].[aspsearch]
> needs to be
> [mgbsvr1].[dnn].[dbo].[aspsearch]
> I looked up the books online and found this syntax:
> sp_changeobjectowner [ @.objname = ] 'object' , [ @.newowner = ] 'owner'
> But I can't see how to use it, nor more importantly, where I should use
it.
> It won't work in the query tool in Enterprise Manager. If I need to create
a
> script (which I've never done before), how do I execute the script?
> All help deeply appreciated
> Manning, Sydney|||Manning (manning@.NOSPAMbartlett.net) writes:
> But I can't see how to use it, nor more importantly, where I should use
> it. It won't work in the query tool in Enterprise Manager. If I need to
> create a script (which I've never done before), how do I execute the
> script?

Enterprise Manager is not much of a query tool. Use Query Analyzer
instead.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||John and Erland

Thanks for your advice - problem fixed.

Manning

"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3f79bb7b$0$8769$ed9e5944@.reading.news.pipex.n et...
> Hi
> You will need to be connected to [mgbsvr1].[dnn] with either sysadmin,
> db_ddladmin and db_securityadmin rights or the dbo to issue the statement
> sp_changeobjectowner '[dnnadmin].[aspsearch]' , 'dbo'
> John

Monday, March 19, 2012

Changing source filename in DTS

Hi!
Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?Hi!

Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?

Check out the Dynamic Properties Task.

Regards,

hmscott

Thursday, March 8, 2012

Changing queries for SQL Server 2000

I am currently using ASP as the front end and SQL Server 7.0 as backend. We are migrating SQL Server 7.0 to SQL Server 2000. How this will affect my queries used in the fron-end. Also as for as T-SQL is concerned what are all the changes happened in SQL Server 2000 (which is not there in SQL Server 7.0)?I think 2000 is pretty good backwards compatible with SQL 7.0 scripts, check out these pages for features in SQL 2K.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_00_1lbn.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag2k/html/CoolestFeatures.asp

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/reskit/sql2000/part1/c0261.asp

HTH

Wednesday, March 7, 2012

Changing paper size through asp

I have designed a report on my local drive to be used as a label (4" X2") I've installed the driver for the label printer and set the paper size. Works Great. I put the report on our Crystal Server where it is called through asp. Instead of getting individual 4X2 labels, I get an 8X10 with all the labels listed. Is there a way to define the paper size through the asp page? Or does the printer driver need to be installed on the server? I don't want to mess things up for our IT people and none of them know the solution. Thanks!Hi,

To set the papersize you can use,

session("oRpt").PaperSize property.

=>session("oRpt") is the Report Object

But I'm not sure about the driver. Postively it will expect all the resources in Server.

Sunday, February 12, 2012

Changing database query (server, database, tables and query)

I'm working with ASP.NET web forms (using Visual Studio and C# code)
I've now introduced 'SQL Server 2000 Reporting Services' and am impressed
with what I've seen so far (albeit that I've only spent a few hours with it).
:)
1). I need the ability to point the report to a server / database rather
than always have it running against the same target. Similarly I may need to
change the SQL syntax of the query being run (rather than relying on
parameter passing).
It looks as if I need to do this via making use of the web service - but I
can't get my head around this.
Thanks in advance
SteveI've just posted a DPE to
http://workspaces.gotdotnet.com/appworld that may help you.
Regards
Toby
"Steve_S3T" <Steve_S3T@.discussions.microsoft.com> wrote in message
news:4AEF4962-798A-4C11-BFEF-B30E4800ADDA@.microsoft.com...
> I'm working with ASP.NET web forms (using Visual Studio and C# code)
> I've now introduced 'SQL Server 2000 Reporting Services' and am impressed
> with what I've seen so far (albeit that I've only spent a few hours with
it).
> :)
> 1). I need the ability to point the report to a server / database rather
> than always have it running against the same target. Similarly I may need
to
> change the SQL syntax of the query being run (rather than relying on
> parameter passing).
> It looks as if I need to do this via making use of the web service - but
I
> can't get my head around this.
> Thanks in advance
> Steve