Video url problem

  • Hello friends,

    I am using sql server 2008 r2 and .net.

    I am passing video links in dynamic way. but the problem i am facing here is that, the video links and images which contains '&'(ampersand) that are not getting reflected.

    E.G :-

    For video :-

    http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro

    actually this video link is right but on my side server it is not getting reflected.

    For Image,

    bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG

    I am not able to find out the actual reason behind it. If i use the link in HTML page then it is reflected. but if i am passing it through database(dynamically) then it creating issue.

    Please guide me

    Thanks & Regards,
    Pallavi

  • pallavi.unde (5/18/2012)


    Hello friends,

    I am using sql server 2008 r2 and .net.

    I am passing video links in dynamic way. but the problem i am facing here is that, the video links and images which contains '&'(ampersand) that are not getting reflected.

    E.G :-

    For video :-

    http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro

    actually this video link is right but on my side server it is not getting reflected.

    For Image,

    bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG

    I am not able to find out the actual reason behind it. If i use the link in HTML page then it is reflected. but if i am passing it through database(dynamically) then it creating issue.

    Please guide me

    Hi,

    I created a table (in sql 2008r2, and sql 2012 server) to test your links, and it works fine.

    create table VideoTest

    (

    Id Int Primary Key Identity,

    YouTubeLink Varchar(1000)

    )

    Insert Into VideoTest(YouTubeLink)

    Values

    ('http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro'),

    ('bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG')

    The following select returns the two rows

    Select * From VideoTest

    When you create the query using the dynamic way in .Net, do you put '@' in front of your strings? If you didn't, try '@', it makes to ignore the special characters.

    Regards

    IgorMi

    Igor Micev,My blog: www.igormicev.com

  • Are you sure these values are reching to SQL Server as you mentioned?

    I don't find any issues on SQL Server side...

    declare @vid_url varchar(100), @img_url varchar(100)

    select 'http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro' as vido_url,

    'bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG' as image_url

    set @vid_url = 'http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro'

    set @img_url = 'bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG'

    select @vid_url as vido_url, @img_url as image_url

    Result:

    vido_url image_url

    ------------------------------------------------------------------ -------------------------------------------------------------------------------------------

    http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG

    (1 row(s) affected)

    vido_url image_url

    ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------

    http://www.youtube.com/watch?feature=player_embedded&v=5kslTIy-5ro bharatividyapeethsinstofmgmtstudies[highlight=#ffff11]&[/highlight]resea,navimumbai,lib.PNG

    (1 row(s) affected)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply