Friday, March 23, 2012
ListSecureMethods - does not return any data
the methods. This call returns no errors but the object does not have
any method names.
Here is the code:
Dim RS As New ProjectName.systemname.ReportingService
RS.Credentials = New System.Net.NetworkCredential(sUserName,
sPassword)
Dim methods As String() = RS.ListSecureMethods()
If Not (methods Is Nothing) Then
Dim method As String
For Each method In methods
'Console.WriteLine(method)
Listbox4.Items.Add(method)
Next method
End If
I pulled this code from the Microsoft site.
I'm running in Debug mode on my pc. The Reporting Server is a win2003
server. The SQL database is on a Win2000 server.
I'm running Visual Studio.Net vs 7.1.3088 with a Framework 1.1.4322.
The machine.config file has the Level set to 0 (zero).
I'm sure this is a security setting - I'm just not sure what it needs
to be. SSL is not being used as of yet. The Lan Admin group is
researching the request.
Any pointers would be greatly appreciated.
Thanks,ListSecureMethod will return various methods based on the value of
SecureConnectionLevel in the RSReportServer.config file.
For more info on the value of SecureConnectionLevel see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_2xiq.asp
Also this link gives info about using ListSecureMethods:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_5zdu.asp
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"coder" <tkingsle@.unifirst.com> wrote in message
news:1102969274.316120.216520@.z14g2000cwz.googlegroups.com...
> I'm calling ListSecureMethods to verify the requirements for each of
> the methods. This call returns no errors but the object does not have
> any method names.
> Here is the code:
> Dim RS As New ProjectName.systemname.ReportingService
> RS.Credentials = New System.Net.NetworkCredential(sUserName,
> sPassword)
> Dim methods As String() = RS.ListSecureMethods()
> If Not (methods Is Nothing) Then
> Dim method As String
> For Each method In methods
> 'Console.WriteLine(method)
> Listbox4.Items.Add(method)
> Next method
> End If
> I pulled this code from the Microsoft site.
> I'm running in Debug mode on my pc. The Reporting Server is a win2003
> server. The SQL database is on a Win2000 server.
> I'm running Visual Studio.Net vs 7.1.3088 with a Framework 1.1.4322.
> The machine.config file has the Level set to 0 (zero).
> I'm sure this is a security setting - I'm just not sure what it needs
> to be. SSL is not being used as of yet. The Lan Admin group is
> researching the request.
> Any pointers would be greatly appreciated.
> Thanks,
>
lists through sp_helpsrvrolemember return unexpected results
users with 'sysadmin' permissions, my result set was inconsistent. Users tha
t
had the permissions removed weeks ago still showed up, however, when running
the query hours later, the results set changed and did not reflect the old
permissions.
Is this a known bug, a cache issue that needs restarts?
(This is a SQL 2000 sp4 instance)
DougCan you recreate that with a test database? I'm not able to do that here on
my system.
"Doug Olson" wrote:
> When running the stored procedure sp_helpsrvrolemember to return a list of
> users with 'sysadmin' permissions, my result set was inconsistent. Users t
hat
> had the permissions removed weeks ago still showed up, however, when runni
ng
> the query hours later, the results set changed and did not reflect the old
> permissions.
> Is this a known bug, a cache issue that needs restarts?
> (This is a SQL 2000 sp4 instance)
> Doug|||I haven't been able to exactly re-create it, however, I have received some
communication/feedback that this is related to a ghosting issue/problem.
Doug
"Buck Woody - Microsoft SQL Server Team" wrote:
[vbcol=seagreen]
> Can you recreate that with a test database? I'm not able to do that here o
n
> my system.
> "Doug Olson" wrote:
>|||Good stuff - so do you have this solved?
"Doug Olson" wrote:
[vbcol=seagreen]
> I haven't been able to exactly re-create it, however, I have received some
> communication/feedback that this is related to a ghosting issue/problem.
> Doug
> "Buck Woody - Microsoft SQL Server Team" wrote:
>
Monday, March 19, 2012
List when Changes occur
I have a historical list of digatal points listed by time.ie: 3 fields
PointName;Date/Time;State.
I need to return a list of When a specific point chsnges state.
For example a list everytime Point A transitions to State 1.
Any help is appreciated.
--
Posted via http://dbforums.comAssuming your table looks like this:
CREATE TABLE PointStates (pointname CHAR(1), dt DATETIME, state INTEGER NOT
NULL, PRIMARY KEY (pointname,dt))
You can use this query:
SELECT DISTINCT
MIN(B.dt)
FROM PointStates AS A
JOIN PointStates AS B
ON A.pointname = B.pointname
AND A.dt < B.dt
AND A.state<>B.state
GROUP BY A.pointname, A.dt
--
David Portas
----
Please reply only to the newsgroup
--
Friday, March 9, 2012
List of SQL table that have data in it
s
more than 0 records how can I do that ?
Thanks
FREDTry,
use northwind
go
create table #t (
tname sysname,
rcnt int
)
declare @.tn sysname
declare @.sql nvarchar(4000)
declare my_cursor cursor local fast_forward
for
select
quotename(table_schema) + '.' + quotename(table_name)
from
information_schema.tables
where
objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsUserTable') = 1
and objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsMSShipped') = 0
open my_cursor
while 1 = 1
begin
fetch next from my_cursor into @.tn
if @.@.error != 0 or @.@.fetch_status != 0 break
set @.sql = N'select ''' + @.tn + N''', count(*) from ' + @.tn
insert into #t
exec sp_executesql @.sql
end
close my_cursor
deallocate my_cursor
select
*
from
#t
where
rcnt > 0
drop table #t
go
AMB
"FRED" wrote:
> I want to create a query to return all table name in my SQL database that
has
> more than 0 records how can I do that ?
> Thanks
> FRED
>|||Is this useful for you?
select object_name(si.id), rows
from sysindexes si
where si.id = (select object_id(so.name) from sysobjects so where so.type =
'u' and si.id = so.id)
and si.indid < 2
and si.rows > 0
order by 1
"FRED" <FRED@.discussions.microsoft.com> wrote in message
news:7BAC0DB0-2BA9-436F-8105-FCC395631E1A@.microsoft.com...
> I want to create a query to return all table name in my SQL database that
has
> more than 0 records how can I do that ?
> Thanks
> FRED
>|||My problem is solved
Thanks
FRED
"Armando Prato" wrote:
> Is this useful for you?
> select object_name(si.id), rows
> from sysindexes si
> where si.id = (select object_id(so.name) from sysobjects so where so.type
=
> 'u' and si.id = so.id)
> and si.indid < 2
> and si.rows > 0
> order by 1
> "FRED" <FRED@.discussions.microsoft.com> wrote in message
> news:7BAC0DB0-2BA9-436F-8105-FCC395631E1A@.microsoft.com...
> has
>
>
Friday, February 24, 2012
List Attribute Names for Single Node
Hello,
I am trying to accomplish the following goal:
"For any given node in an xml variable, return via recordset a list of attributes."
Take the following query:
DECLARE @.x xml
SET @.x = '
<Item>
<Data Key="ID" Value="1001" />
<Data Key="Name" Value="Blue" />
<Data Key="Type" Value="Color" />
</Item>'
SELECT x.value('@.Key','varchar(255)') as [Key],
x.value('@.Value','varchar(255)') as [Value]
FROM @.x.nodes('//Item/Data') Data(x)
That will return:
Key | Value
-
ID | 1001
Name | Blue
Type | Color
What I want is to be able to query @.x ahead of time such that I get back something to the effect of:
Attribute
Key
Value
The reason is that I want to be able to build the columns of my SELECT statement dynamically by iterating through the attributes of a node. I would then execute my prepared statement to get that Key/Value recordset back.
Ignoring the structure of my example XML, what I'm returning in my Key/Value recordset, and how I'm going about returning it...all I want is to know whether or not I can get via recordset a list of attributes for an XML node, and if I can, how I do it.
Thanks!
Daniel
This is a bit clumsey, but should work.
WITH AllAttr(Vals)
AS
(SELECT @.x.query('<root>{for $a in /Item/Data/@.* return <attr>{$a}</attr>}</root>'))
SELECT DISTINCT
x.value('local-name(@.*[1])','varchar(255)') as [Attribute]
FROM AllAttr
CROSS APPLY Vals.nodes('/root/attr') Data(x)
For any given node, for example <Data>, you do:
declare @.x xml
SET @.x = '
<Item>
<Data Key="ID" Value="1001" />
<Data Key="Name" Value="Blue" />
<Data Key="Type" Value="Color" />
</Item>'
select distinct x.value('local-name(.)', 'varchar(20)')
from @.x.nodes('//Data/@.*') as ref(x)
Monday, February 20, 2012
list all of a set of rows when only one row is true
This is stupid, I used to be able to do this all the time by mistake now I can't do it on purpose
I want to be able to return a full list of matching records when only one is true
Like
Row 1, ID_1, false
Row 2, ID_1, false
Row 3, ID_1, true
Row 4, ID_2, false
Row 5, ID_2, true
Row 6, ID_2, false
I currently get
Row 3, ID_1, true
Row 5, ID_2, true
In order for us to help you, you need to give us better information. We dont know what you are trying to do, what query you are using/what version of SQL you are using etc. Please post all the relevant information.|||
I think I have got it, using a derived table
Using the results from the derived table to join to the main table and substituting the ClosedDate in the main table with the ClosedDate from the Derived table
Of course I have no idea if this is the best solution
SELECT
derivedEvents.ClosedDate, derivedEvents.IRefFROM(SELECTClosedDate, IRef
FROMdbo.tblOCompEvents
WHERE(ClientID = ClientID)AND(IRef = IRef)AND(closed = 1))ASderivedEventsINNER JOIN
dbo.tblOCompEventsAStblOCompEvents_1ONderivedEvents.IRef = tblOCompEvents_1.IRef
ORDER BYderivedEvents.IRef|||
I have postedmy solution but any thing better... thanks for your interest
In my table I have events for client activity eventualy each series of events will be closed and a date inserted
the user wants to review all events for each client where the series has been closed, previously I could only return the closed row not the whole series
This is for a report which lists all events for all clients where the series of events has been closed