Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Saturday, February 25, 2012

cmd.Parameters question?

I have several parameters that are passed to a stored procedure. One of them is a website URL. How can I strip out the http:// if it exists from the value before it is passed to the SP? Can the removal be handled in the cmd. statement in the code behind?

SqlConnection con3 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString3"].ConnectionString);
SqlCommand cmd3 = new SqlCommand("AdminStoresStudiosLinkSubmit", con3);
cmd3.CommandType = CommandType.StoredProcedure;
cmd3.Parameters.AddWithValue("@.SL_Name", L_Name);
cmd3.Parameters.AddWithValue("@.L_URL", L_URL);

L_URL =http://www.homepage.com and want onlywww.homepage.com to be passed into database.

Thank you,

Use the Replace command e.g. L_URL.Replace("http://", "")

|||

How would that be embedded in -cmd3.Parameters.AddWithValue("@.SL_URL", SL_URL);

thank you

|||

Below is how I initially assign the parameter value. How would I Replace the http:// at this stage?

string SL_URL = tbx_SL_URL.Text;

|||I see it now - different from classic asp -

string L_URL = tbxL_URL.Text;

L_URL = L_URL.Replace("http://","");

thank you

|||

Consider that a URL may begin with other schemes. So, is it good enough to just replacehttp:// or do you needhttps:// andftp:// andssh:// etc... ? If so, you'll want to remove*:// which could be done with well crafted regular expression (in your favorite .Net language of choice).

Sunday, February 19, 2012

Clustering configuring

Hi all,
I'm new to clustering. Is there any website on how i could learn to
configure clustering.
I have 2 new servers(Svr1 & Svr2) and san storage. On Svr1 i'm going to
install Win 2003 and sql 2000. Svr2 is going to be application server(dfs,
VB.NET, etc).
Can anyone help me on how should i do the configuration.
Appreciate ur help.
Tks
Message posted via http://www.sqlmonster.com
Hi
http://www.microsoft.com/windowsserv...g/default.mspx
Importantly, the applications you install must be at least cluster aware.
http://msdn.microsoft.com/library/de...plications.asp
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mohd via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in message
news:a65b8f99202043dfba56c3b4499fb5a6@.SQLMonster.c om...
> Hi all,
> I'm new to clustering. Is there any website on how i could learn to
> configure clustering.
> I have 2 new servers(Svr1 & Svr2) and san storage. On Svr1 i'm going to
> install Win 2003 and sql 2000. Svr2 is going to be application server(dfs,
> VB.NET, etc).
> Can anyone help me on how should i do the configuration.
> Appreciate ur help.
> Tks
> --
> Message posted via http://www.sqlmonster.com
|||We website has a ton of information.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
"Mohd via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in message
news:a65b8f99202043dfba56c3b4499fb5a6@.SQLMonster.c om...
> Hi all,
> I'm new to clustering. Is there any website on how i could learn to
> configure clustering.
> I have 2 new servers(Svr1 & Svr2) and san storage. On Svr1 i'm going to
> install Win 2003 and sql 2000. Svr2 is going to be application server(dfs,
> VB.NET, etc).
> Can anyone help me on how should i do the configuration.
> Appreciate ur help.
> Tks
> --
> Message posted via http://www.sqlmonster.com
|||We? Where did that come from. I meant my. DOH!
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:OjlOfTDQFHA.204@.TK2MSFTNGP15.phx.gbl...
> We website has a ton of information.
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering Website
> http://msmvps.com/clustering - Blog
> "Mohd via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in message
> news:a65b8f99202043dfba56c3b4499fb5a6@.SQLMonster.c om...
>