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,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,
>
Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts
Friday, March 23, 2012
Monday, March 19, 2012
listavailablesqlservers returns only default instances - please help!
Hiya,
I'm trying to write an application in which I call listavailablesqlservers()
(using
SQLDMO). My intention is to get a list of all available sql server instances
available on the network (including the machine on which the app is
running). However, listavailablesqlservers() seems to return only the
default instances and ignores all other instances.
Anyone else encounter this problem or have a work around?
I'm developing using VB.NET on a Windows XP Professional machine running
both SQL Server Developer edition (my default instance) and an MSDE named
instance.
Any help would be greatly appreciated as I've unsuccessfully trawled the
Internet looking for an answer.
Thanks in advance.
Kas.Kas,
Does this help?
http://msdn.microsoft.com/library/default.asp
?url=/library/en-us/sqldmo/dmoref_p_i_95gp.asp
Russell Fields
"rearwindow" <summerof_89@.hotmail.com> wrote in message
news:bsarm9$as3$1$8302bc10@.news.demon.co.uk...
> Hiya,
> I'm trying to write an application in which I call
listavailablesqlservers()
> (using
> SQLDMO). My intention is to get a list of all available sql server
instances
> available on the network (including the machine on which the app is
> running). However, listavailablesqlservers() seems to return only the
> default instances and ignores all other instances.
> Anyone else encounter this problem or have a work around?
> I'm developing using VB.NET on a Windows XP Professional machine running
> both SQL Server Developer edition (my default instance) and an MSDE named
> instance.
> Any help would be greatly appreciated as I've unsuccessfully trawled the
> Internet looking for an answer.
> Thanks in advance.
> Kas.
>
I'm trying to write an application in which I call listavailablesqlservers()
(using
SQLDMO). My intention is to get a list of all available sql server instances
available on the network (including the machine on which the app is
running). However, listavailablesqlservers() seems to return only the
default instances and ignores all other instances.
Anyone else encounter this problem or have a work around?
I'm developing using VB.NET on a Windows XP Professional machine running
both SQL Server Developer edition (my default instance) and an MSDE named
instance.
Any help would be greatly appreciated as I've unsuccessfully trawled the
Internet looking for an answer.
Thanks in advance.
Kas.Kas,
Does this help?
http://msdn.microsoft.com/library/default.asp
?url=/library/en-us/sqldmo/dmoref_p_i_95gp.asp
Russell Fields
"rearwindow" <summerof_89@.hotmail.com> wrote in message
news:bsarm9$as3$1$8302bc10@.news.demon.co.uk...
> Hiya,
> I'm trying to write an application in which I call
listavailablesqlservers()
> (using
> SQLDMO). My intention is to get a list of all available sql server
instances
> available on the network (including the machine on which the app is
> running). However, listavailablesqlservers() seems to return only the
> default instances and ignores all other instances.
> Anyone else encounter this problem or have a work around?
> I'm developing using VB.NET on a Windows XP Professional machine running
> both SQL Server Developer edition (my default instance) and an MSDE named
> instance.
> Any help would be greatly appreciated as I've unsuccessfully trawled the
> Internet looking for an answer.
> Thanks in advance.
> Kas.
>
List() Function
Sybase has implemented a useful aggregate function called list() which takes
a column and returns all values in a comma delimited string. In Oracle10g,
there is a Java solution to duplicate this aggregation function. Now I have
to do the same in SQLServer2005. I found the UDA (User Defined Aggregate)
support in MSSQL2005 and some sample codes in C#. Has anyone done this
before? If someone can upload a precompiled module, it will save me some
effort. TIA.
I am downloading .Net Framework 2.0 SDK right now and hopefully it contains
a C# compiler. Otherwise, I have to buy a copy of Visual Studio .Net just
for this function.Why do you think you need to use a UDA aggregate for this? Seems like
overkill, since several other methods already exist and are widely
available. You may be able to write something that performs a few
milliseconds faster, but it will come at considerable development cost, and
there is plenty of room for new problems.
"mason" <masonliu@.msn.com> wrote in message
news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Sybase has implemented a useful aggregate function called list() which
> takes a column and returns all values in a comma delimited string. In
> Oracle10g, there is a Java solution to duplicate this aggregation
> function. Now I have to do the same in SQLServer2005. I found the UDA
> (User Defined Aggregate) support in MSSQL2005 and some sample codes in C#.
> Has anyone done this before? If someone can upload a precompiled module,
> it will save me some effort. TIA.
> I am downloading .Net Framework 2.0 SDK right now and hopefully it
> contains a C# compiler. Otherwise, I have to buy a copy of Visual Studio
> .Net just for this function.|||I know. This is a migration project. If I can duplicate as much as possible
at the backend, I'll save tremendous efforts at the frontend. Besides, there
is only one aggregate function I like to create and I found some sample
source codes, it shouldn't be too bad. Thanks.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23hYedq$NGHA.740@.TK2MSFTNGP12.phx.gbl...
> Why do you think you need to use a UDA aggregate for this? Seems like
> overkill, since several other methods already exist and are widely
> available. You may be able to write something that performs a few
> milliseconds faster, but it will come at considerable development cost,
> and there is plenty of room for new problems.
>
>
> "mason" <masonliu@.msn.com> wrote in message
> news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...
>|||Check out 'For Xml Path' in:
http://www.aspfaq.com/show.asp?id=2529
Her is more from Tony Rogerson SQL Server MVP:
>
In SQL Server 2005 we can very simply use some of the new XML features to
get what we want...
select distinct type,
( select name + ', ' as [text()]
from sys.objects s
where s.type = so.type
order by name
for xml path( '' )
) as concatenated_name
from sys.objects so
order by type
This is documented in books online, look up 'Using PATH mode'
(ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a685a9ad-3d28-4596-aa72-119202df3976.htm)[
color=darkred]
>[/color]
www.rac4sql.net|||Thanks. I read about these solutions on the web. The issue is the list() has
been a very popular function to be called in embedded SQL statements by our
apps and in some stored procedures. If I do not implement this, we have to
hunt down those codes and perform IF ELSE logic, very tedious work. If one
day, a customer insists to use DB2, we have to go thru this process again.
Therefore, finding backend portable solution is usually the most cost
efficient for us.
"05ponyGT" <noname@.overwood.com> wrote in message
news:ekltQ0$NGHA.1124@.TK2MSFTNGP10.phx.gbl...
> Check out 'For Xml Path' in:
> http://www.aspfaq.com/show.asp?id=2529
> Her is more from Tony Rogerson SQL Server MVP:
>
> In SQL Server 2005 we can very simply use some of the new XML features to
> get what we want...
> select distinct type,
> ( select name + ', ' as [text()]
> from sys.objects s
> where s.type = so.type
> order by name
> for xml path( '' )
> ) as concatenated_name
> from sys.objects so
> order by type
> This is documented in books online, look up 'Using PATH mode'
> (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a685a9ad-3d28-4596-aa72-1
19202df3976.htm)
> www.rac4sql.net
>|||Oh my, a helpful post. :)
> 05ponyGT
Nice ride.|||> Oh my, a helpful post. :)
> Nice ride.
Vert.
3.73 tush,bassani axle backs and x-pipe,jba headers,
aem cai,flashed.
BAD A$& Car
:P|||05ponyGT <nospam@.nospam> wrote:
>
> Vert.
> 3.73 tush,bassani axle backs and x-pipe,jba headers,
> aem cai,flashed.
> BAD A$& Car
> :P
I'm impressed! :)|||I have implemented list() UDA function in MSSQL2005 successfully. The source
codes are adapted from Anthony Trudeau's blog page. Here are the steps if a
nyone's interested.
1. Download .Net Framework 2.0 SDK and/or Visual C# 2005 Express. Both are f
ree. The purpose is to get the C# compiler (csc.exe) and the latter gives yo
u the IDE to config the module version info if you care. Create a class libr
ary project and compile the C# source codes from Anthony Trudeau's example (
make appropriate modifications as I did if necessary). You will get a DLL. T
o skip this step, you can use the DLL I attached to this msg.
2. Run the following SQL to create the list() aggregate function:
CREATE ASSEMBLY UDAFunctions FROM 'C:\TEMP\ListClassLibrary.dll'
go
CREATE AGGREGATE list(@.value NVARCHAR(4000)) RETURNS NVARCHAR(4000)
EXTERNAL NAME [UDAFunctions].[SqlAggregateFunctions.List]
go
Now, you can issue SQLs like the following to get a comma delimited value li
st such as 2001,2003,2006 and CA,TX,NY,IL,FL.
SELECT dbo.list(mycol) from mytable WHERE ...
The only limitation is, as in Oracle10g, that ORDER BY clause is not support
ed, which you can do in Sybase.
"mason" <masonliu@.msn.com> wrote in message news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...[c
olor=darkred]
> Sybase has implemented a useful aggregate function called list() which tak
es
> a column and returns all values in a comma delimited string. In Oracle10g,
> there is a Java solution to duplicate this aggregation function. Now I hav
e
> to do the same in SQLServer2005. I found the UDA (User Defined Aggregate)
> support in MSSQL2005 and some sample codes in C#. Has anyone done this
> before? If someone can upload a precompiled module, it will save me some
> effort. TIA.
>
> I am downloading .Net Framework 2.0 SDK right now and hopefully it contain
s
> a C# compiler. Otherwise, I have to buy a copy of Visual Studio .Net just
> for this function.
>[/color]|||>> If I do not implement this, we have to hunt down those codes and perform
IF ELSE logic, very tedious work. If one day, a customer insists to use DB2
, we have to go thru this process again. Therefore, finding backend portabl
e solution is usually the m
ost cost efficient for us. <<
Think of this as how God punishes programmers who do not write portable
code in the firsts place. Your backend solution is probably going to
involve different proprietary code in the target product. The reason I
say that is that LIST() is a way to screw up 1NF, so it is not going to
be popular with RDBMS people and it is not part of the Standards. It
was proposed at one time and was voted down.
What you are setting yourself up for is having to maintain (n) code
bases instead of one. Bite the bullet and do it right. Oh, and beat
your developers who wrote you into this corner.
Based on a few decades of patching bad SQL, I am not sure that you will
need IF-THEN-ELSE code in your SQL, if you do it right.
a column and returns all values in a comma delimited string. In Oracle10g,
there is a Java solution to duplicate this aggregation function. Now I have
to do the same in SQLServer2005. I found the UDA (User Defined Aggregate)
support in MSSQL2005 and some sample codes in C#. Has anyone done this
before? If someone can upload a precompiled module, it will save me some
effort. TIA.
I am downloading .Net Framework 2.0 SDK right now and hopefully it contains
a C# compiler. Otherwise, I have to buy a copy of Visual Studio .Net just
for this function.Why do you think you need to use a UDA aggregate for this? Seems like
overkill, since several other methods already exist and are widely
available. You may be able to write something that performs a few
milliseconds faster, but it will come at considerable development cost, and
there is plenty of room for new problems.
"mason" <masonliu@.msn.com> wrote in message
news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Sybase has implemented a useful aggregate function called list() which
> takes a column and returns all values in a comma delimited string. In
> Oracle10g, there is a Java solution to duplicate this aggregation
> function. Now I have to do the same in SQLServer2005. I found the UDA
> (User Defined Aggregate) support in MSSQL2005 and some sample codes in C#.
> Has anyone done this before? If someone can upload a precompiled module,
> it will save me some effort. TIA.
> I am downloading .Net Framework 2.0 SDK right now and hopefully it
> contains a C# compiler. Otherwise, I have to buy a copy of Visual Studio
> .Net just for this function.|||I know. This is a migration project. If I can duplicate as much as possible
at the backend, I'll save tremendous efforts at the frontend. Besides, there
is only one aggregate function I like to create and I found some sample
source codes, it shouldn't be too bad. Thanks.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23hYedq$NGHA.740@.TK2MSFTNGP12.phx.gbl...
> Why do you think you need to use a UDA aggregate for this? Seems like
> overkill, since several other methods already exist and are widely
> available. You may be able to write something that performs a few
> milliseconds faster, but it will come at considerable development cost,
> and there is plenty of room for new problems.
>
>
> "mason" <masonliu@.msn.com> wrote in message
> news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...
>|||Check out 'For Xml Path' in:
http://www.aspfaq.com/show.asp?id=2529
Her is more from Tony Rogerson SQL Server MVP:
>
In SQL Server 2005 we can very simply use some of the new XML features to
get what we want...
select distinct type,
( select name + ', ' as [text()]
from sys.objects s
where s.type = so.type
order by name
for xml path( '' )
) as concatenated_name
from sys.objects so
order by type
This is documented in books online, look up 'Using PATH mode'
(ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a685a9ad-3d28-4596-aa72-119202df3976.htm)[
color=darkred]
>[/color]
www.rac4sql.net|||Thanks. I read about these solutions on the web. The issue is the list() has
been a very popular function to be called in embedded SQL statements by our
apps and in some stored procedures. If I do not implement this, we have to
hunt down those codes and perform IF ELSE logic, very tedious work. If one
day, a customer insists to use DB2, we have to go thru this process again.
Therefore, finding backend portable solution is usually the most cost
efficient for us.
"05ponyGT" <noname@.overwood.com> wrote in message
news:ekltQ0$NGHA.1124@.TK2MSFTNGP10.phx.gbl...
> Check out 'For Xml Path' in:
> http://www.aspfaq.com/show.asp?id=2529
> Her is more from Tony Rogerson SQL Server MVP:
>
> In SQL Server 2005 we can very simply use some of the new XML features to
> get what we want...
> select distinct type,
> ( select name + ', ' as [text()]
> from sys.objects s
> where s.type = so.type
> order by name
> for xml path( '' )
> ) as concatenated_name
> from sys.objects so
> order by type
> This is documented in books online, look up 'Using PATH mode'
> (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a685a9ad-3d28-4596-aa72-1
19202df3976.htm)
> www.rac4sql.net
>|||Oh my, a helpful post. :)
> 05ponyGT
Nice ride.|||> Oh my, a helpful post. :)
> Nice ride.
Vert.
3.73 tush,bassani axle backs and x-pipe,jba headers,
aem cai,flashed.
BAD A$& Car
:P|||05ponyGT <nospam@.nospam> wrote:
>
> Vert.
> 3.73 tush,bassani axle backs and x-pipe,jba headers,
> aem cai,flashed.
> BAD A$& Car
> :P
I'm impressed! :)|||I have implemented list() UDA function in MSSQL2005 successfully. The source
codes are adapted from Anthony Trudeau's blog page. Here are the steps if a
nyone's interested.
1. Download .Net Framework 2.0 SDK and/or Visual C# 2005 Express. Both are f
ree. The purpose is to get the C# compiler (csc.exe) and the latter gives yo
u the IDE to config the module version info if you care. Create a class libr
ary project and compile the C# source codes from Anthony Trudeau's example (
make appropriate modifications as I did if necessary). You will get a DLL. T
o skip this step, you can use the DLL I attached to this msg.
2. Run the following SQL to create the list() aggregate function:
CREATE ASSEMBLY UDAFunctions FROM 'C:\TEMP\ListClassLibrary.dll'
go
CREATE AGGREGATE list(@.value NVARCHAR(4000)) RETURNS NVARCHAR(4000)
EXTERNAL NAME [UDAFunctions].[SqlAggregateFunctions.List]
go
Now, you can issue SQLs like the following to get a comma delimited value li
st such as 2001,2003,2006 and CA,TX,NY,IL,FL.
SELECT dbo.list(mycol) from mytable WHERE ...
The only limitation is, as in Oracle10g, that ORDER BY clause is not support
ed, which you can do in Sybase.
"mason" <masonliu@.msn.com> wrote in message news:uqeTYn$NGHA.1028@.TK2MSFTNGP11.phx.gbl...[c
olor=darkred]
> Sybase has implemented a useful aggregate function called list() which tak
es
> a column and returns all values in a comma delimited string. In Oracle10g,
> there is a Java solution to duplicate this aggregation function. Now I hav
e
> to do the same in SQLServer2005. I found the UDA (User Defined Aggregate)
> support in MSSQL2005 and some sample codes in C#. Has anyone done this
> before? If someone can upload a precompiled module, it will save me some
> effort. TIA.
>
> I am downloading .Net Framework 2.0 SDK right now and hopefully it contain
s
> a C# compiler. Otherwise, I have to buy a copy of Visual Studio .Net just
> for this function.
>[/color]|||>> If I do not implement this, we have to hunt down those codes and perform
IF ELSE logic, very tedious work. If one day, a customer insists to use DB2
, we have to go thru this process again. Therefore, finding backend portabl
e solution is usually the m
ost cost efficient for us. <<
Think of this as how God punishes programmers who do not write portable
code in the firsts place. Your backend solution is probably going to
involve different proprietary code in the target product. The reason I
say that is that LIST() is a way to screw up 1NF, so it is not going to
be popular with RDBMS people and it is not part of the Standards. It
was proposed at one time and was voted down.
What you are setting yourself up for is having to maintain (n) code
bases instead of one. Bite the bullet and do it right. Oh, and beat
your developers who wrote you into this corner.
Based on a few decades of patching bad SQL, I am not sure that you will
need IF-THEN-ELSE code in your SQL, if you do it right.
Friday, February 24, 2012
list box is not displaying
I have a list box getting a filtered recordset from a stored procedure using ADO calling in VB6.
The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?
Function ..
Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer
Set lot_n = 4051
Rs_get_defect_desc.Open "EXEC spGet_desc_defect @.lot_n=" & lot_n, CurrentProject.Connection
Do While Not rs_get_defect_desc.EOF
lstbox.RowSource = rs_get_defect_desc(0) & " " & rs_get_defect_desc(1)
rs_get_defect_desc.MoveNext
LoopI am confused, - is it VB6 or Access?
The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?
Function ..
Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer
Set lot_n = 4051
Rs_get_defect_desc.Open "EXEC spGet_desc_defect @.lot_n=" & lot_n, CurrentProject.Connection
Do While Not rs_get_defect_desc.EOF
lstbox.RowSource = rs_get_defect_desc(0) & " " & rs_get_defect_desc(1)
rs_get_defect_desc.MoveNext
LoopI am confused, - is it VB6 or Access?
Subscribe to:
Posts (Atom)