Showing posts with label configure. Show all posts
Showing posts with label configure. Show all posts

Tuesday, March 20, 2012

Can I configure a SQLDataSource object to use.....

.. the Membership ProviderUserKey value as the parameter of a stored procedure ?

It seems obvious to me that you would want to do this, but I can only see that it allows you to pass Profile parameters.

You can pass any value as a parameter. It has some built-in parameter types, such as ProfileParameter, FormParameter, ControlParameter etc, but you can just use <asp:Parameter>. Beyond the most basic of usage, the SqlDataSource isn't the most intuitive of controls, I'm afraid. This should help you unpick it a bit though:http://aspnet.4guysfromrolla.com/articles/030106-1.aspx


|||You can always write your own parameter:
1using System;2using System.ComponentModel;3using System.Globalization;4using System.Web;5using System.Web.Security;6using System.Web.UI;7using System.Web.UI.WebControls;89public class MembershipParameter : Parameter10{11public MembershipParameter(string name, TypeCode typeCode,string propertyName) :base(name, typeCode)12 {13this.PropertyName = propertyName;14 }1516public MembershipParameter(string name,string propertyName) :base(name)17 {18this.PropertyName = propertyName;19 }2021public MembershipParameter()22 {23 }2425protected MembershipParameter(MembershipParameter original) :base(original)26 {27if (null == original)throw new ArgumentNullException("original");28this.PropertyName = original.PropertyName;29 }3031public string PropertyName32 {33get34 {35object value = ViewState["PropertyName"];36if (null !=value)return (string)value;37return string.Empty;38 }39set40 {41if (null !=value && 0 ==value.Length)value =null;42if (!string.Equals(value, (string)ViewState["PropertyName"], StringComparison.OrdinalIgnoreCase))43 {44 ViewState["PropertyName"] =value;45 OnParameterChanged();46 }47 }48 }4950protected override Parameter Clone()51 {52return new MembershipParameter(this);53 }5455protected override object Evaluate(HttpContext context, Control control)56 {57object result =null;58string prop =this.PropertyName;59if (!string.IsNullOrEmpty(prop))60 {61 MembershipUser user = Membership.GetUser();62if (null != user)63 {64 result = DataBinder.Eval(user, prop);65 }66 }6768return result;69 }70}

Thursday, February 16, 2012

Can a parameter act like an Access Combo box?

Hi - Is it possible to configure an SSRS parameter drop down to act like an
Access combo box? The user wants the drop down to auto-complete. Right now,
if the user types "P", the drop down goes to the first item that starts with
P, but then if he types "C", the drop down goes to the first item that starts
with C instead of going to the first item that starts with "PC".
--
Thanks,
JeffIam afraid no.
Amarnath
"Jeff Stroope" wrote:
> Hi - Is it possible to configure an SSRS parameter drop down to act like an
> Access combo box? The user wants the drop down to auto-complete. Right now,
> if the user types "P", the drop down goes to the first item that starts with
> P, but then if he types "C", the drop down goes to the first item that starts
> with C instead of going to the first item that starts with "PC".
> --
> Thanks,
> Jeff

Tuesday, February 14, 2012

Can 2 SQL servers on domain use same port number?

This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new
software onto our domain. They have told us that the 2nd SQL server must us
e a different port number to the 1st SQL server. Is this the case? It make
s no sense to me and is now
causing a problem with another application we wanted to put onto the SQL ser
ver as well. This program has the port address hard coded, and can not be c
hanged which currently means we can't use it. (The 1st server also has a si
milar piece of software on
it which also can't cope with a different port number, so I can't just switc
h them and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by
IP address and then port numbers.
Many thanks
E TaylorYou need different port numbers if you are on the same machine.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new
software onto our domain. They have told us that the 2nd SQL server must
use a different port number to the 1st SQL server. Is this the case? It
makes no sense to me and is now causing a problem with another application
we wanted to put onto the SQL server as well. This program has the port
address hard coded, and can not be changed which currently means we can't
use it. (The 1st server also has a similar piece of software on it which
also can't cope with a different port number, so I can't just switch them
and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by
IP address and then port numbers.
Many thanks
E Taylor|||So if they are on separate servers, they can have the same port number?
"Tom Moreau" wrote:

> You need different port numbers if you are on the same machine.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
> This might seem very obvious... but my knowledge of SQL 2000 is limited.
> We got in a company to install and configure a 2nd SQL server with some ne
w
> software onto our domain. They have told us that the 2nd SQL server must
> use a different port number to the 1st SQL server. Is this the case? It
> makes no sense to me and is now causing a problem with another application
> we wanted to put onto the SQL server as well. This program has the port
> address hard coded, and can not be changed which currently means we can't
> use it. (The 1st server also has a similar piece of software on it which
> also can't cope with a different port number, so I can't just switch them
> and the old server can't cope with anything more being added to it.)
> If they have to have different port numbers, why? I thought traffic went
by
> IP address and then port numbers.
> Many thanks
> E Taylor
>|||Yep.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:9735F449-B89B-4224-A71E-447D02225336@.microsoft.com...
So if they are on separate servers, they can have the same port number?
"Tom Moreau" wrote:

> You need different port numbers if you are on the same machine.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
> This might seem very obvious... but my knowledge of SQL 2000 is limited.
> We got in a company to install and configure a 2nd SQL server with some
new
> software onto our domain. They have told us that the 2nd SQL server must
> use a different port number to the 1st SQL server. Is this the case? It
> makes no sense to me and is now causing a problem with another application
> we wanted to put onto the SQL server as well. This program has the port
> address hard coded, and can not be changed which currently means we can't
> use it. (The 1st server also has a similar piece of software on it which
> also can't cope with a different port number, so I can't just switch them
> and the old server can't cope with anything more being added to it.)
> If they have to have different port numbers, why? I thought traffic went
by
> IP address and then port numbers.
> Many thanks
> E Taylor
>|||Thanks - that helps enormously.
Emma
"Tom Moreau" wrote:

> Yep.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:9735F449-B89B-4224-A71E-447D02225336@.microsoft.com...
> So if they are on separate servers, they can have the same port number?
> "Tom Moreau" wrote:
>
> new
> by
>

Can 2 SQL servers on domain use same port number?

This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new software onto our domain. They have told us that the 2nd SQL server must use a different port number to the 1st SQL server. Is this the case? It makes no sense to me and is now
causing a problem with another application we wanted to put onto the SQL server as well. This program has the port address hard coded, and can not be changed which currently means we can't use it. (The 1st server also has a similar piece of software on
it which also can't cope with a different port number, so I can't just switch them and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by IP address and then port numbers.
Many thanks
E Taylor
You need different port numbers if you are on the same machine.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
..
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new
software onto our domain. They have told us that the 2nd SQL server must
use a different port number to the 1st SQL server. Is this the case? It
makes no sense to me and is now causing a problem with another application
we wanted to put onto the SQL server as well. This program has the port
address hard coded, and can not be changed which currently means we can't
use it. (The 1st server also has a similar piece of software on it which
also can't cope with a different port number, so I can't just switch them
and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by
IP address and then port numbers.
Many thanks
E Taylor
|||So if they are on separate servers, they can have the same port number?
"Tom Moreau" wrote:

> You need different port numbers if you are on the same machine.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
> This might seem very obvious... but my knowledge of SQL 2000 is limited.
> We got in a company to install and configure a 2nd SQL server with some new
> software onto our domain. They have told us that the 2nd SQL server must
> use a different port number to the 1st SQL server. Is this the case? It
> makes no sense to me and is now causing a problem with another application
> we wanted to put onto the SQL server as well. This program has the port
> address hard coded, and can not be changed which currently means we can't
> use it. (The 1st server also has a similar piece of software on it which
> also can't cope with a different port number, so I can't just switch them
> and the old server can't cope with anything more being added to it.)
> If they have to have different port numbers, why? I thought traffic went by
> IP address and then port numbers.
> Many thanks
> E Taylor
>
|||Yep.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
..
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:9735F449-B89B-4224-A71E-447D02225336@.microsoft.com...
So if they are on separate servers, they can have the same port number?
"Tom Moreau" wrote:

> You need different port numbers if you are on the same machine.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
> This might seem very obvious... but my knowledge of SQL 2000 is limited.
> We got in a company to install and configure a 2nd SQL server with some
new
> software onto our domain. They have told us that the 2nd SQL server must
> use a different port number to the 1st SQL server. Is this the case? It
> makes no sense to me and is now causing a problem with another application
> we wanted to put onto the SQL server as well. This program has the port
> address hard coded, and can not be changed which currently means we can't
> use it. (The 1st server also has a similar piece of software on it which
> also can't cope with a different port number, so I can't just switch them
> and the old server can't cope with anything more being added to it.)
> If they have to have different port numbers, why? I thought traffic went
by
> IP address and then port numbers.
> Many thanks
> E Taylor
>
|||Thanks - that helps enormously.
Emma
"Tom Moreau" wrote:

> Yep.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:9735F449-B89B-4224-A71E-447D02225336@.microsoft.com...
> So if they are on separate servers, they can have the same port number?
> "Tom Moreau" wrote:
> new
> by
>

Can 2 SQL servers on domain use same port number?

This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new software onto our domain. They have told us that the 2nd SQL server must use a different port number to the 1st SQL server. Is this the case? It makes no sense to me and is now causing a problem with another application we wanted to put onto the SQL server as well. This program has the port address hard coded, and can not be changed which currently means we can't use it. (The 1st server also has a similar piece of software on it which also can't cope with a different port number, so I can't just switch them and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by IP address and then port numbers.
Many thanks
E TaylorYou need different port numbers if you are on the same machine.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
This might seem very obvious... but my knowledge of SQL 2000 is limited.
We got in a company to install and configure a 2nd SQL server with some new
software onto our domain. They have told us that the 2nd SQL server must
use a different port number to the 1st SQL server. Is this the case? It
makes no sense to me and is now causing a problem with another application
we wanted to put onto the SQL server as well. This program has the port
address hard coded, and can not be changed which currently means we can't
use it. (The 1st server also has a similar piece of software on it which
also can't cope with a different port number, so I can't just switch them
and the old server can't cope with anything more being added to it.)
If they have to have different port numbers, why? I thought traffic went by
IP address and then port numbers.
Many thanks
E Taylor|||Yep.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"KESW" <KESW@.discussions.microsoft.com> wrote in message
news:9735F449-B89B-4224-A71E-447D02225336@.microsoft.com...
So if they are on separate servers, they can have the same port number?
"Tom Moreau" wrote:
> You need different port numbers if you are on the same machine.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> ..
> "KESW" <KESW@.discussions.microsoft.com> wrote in message
> news:EC1BE223-9D7B-4BC9-8004-414E3079D162@.microsoft.com...
> This might seem very obvious... but my knowledge of SQL 2000 is limited.
> We got in a company to install and configure a 2nd SQL server with some
new
> software onto our domain. They have told us that the 2nd SQL server must
> use a different port number to the 1st SQL server. Is this the case? It
> makes no sense to me and is now causing a problem with another application
> we wanted to put onto the SQL server as well. This program has the port
> address hard coded, and can not be changed which currently means we can't
> use it. (The 1st server also has a similar piece of software on it which
> also can't cope with a different port number, so I can't just switch them
> and the old server can't cope with anything more being added to it.)
> If they have to have different port numbers, why? I thought traffic went
by
> IP address and then port numbers.
> Many thanks
> E Taylor
>