Really need to solve this SQL problem to finish this web site.

Discussion in 'ASP .Net Web Controls' started by Miguel Dias Moura, Jun 18, 2004.

  1. Hi,

    i created a dataSet in an ASP.Net page which:

    1. Loads all fields from each database record.
    2. Creates a new field using 2 of the existing fields: FullName = FirstName
    + ' ' + LastName
    3. Loads only the record which has the same FullName as the variable Name
    passed in the URL to this page.

    My SQL is this:

    SELECT *, FirstName + ' ' + LastName as FullName
    FROM people
    WHERE FirstName + ' ' + LastName = ?

    and:

    <Parameter Name="@FullName" Value='<%# IIf((Request.QueryString("Name") <>
    Nothing), Request.QueryString("Name"), "") %>'
    Type="WChar"/></Parameters></MM:DataSet>

    Can you please tell me how to do this?
    I know i allready asked this but until now i got no solution and i need to
    solve this to finish this web site and deliver it.

    I hope i was able to explain better my problem.

    Thank You Very Much,
    Miguel
    Miguel Dias Moura, Jun 18, 2004
    #1
    1. Advertising

  2. Why are you putting the Request.Querystring in a pre-render block, should it
    not be in regular code with the rest of it ? IE

    Value = Request.QueryString("Name")

    --

    OHM ( Terry Burns )
    . . . One-Handed-Man . . .


    "Miguel Dias Moura" <> wrote in message
    news:%...
    > Hi,
    >
    > i created a dataSet in an ASP.Net page which:
    >
    > 1. Loads all fields from each database record.
    > 2. Creates a new field using 2 of the existing fields: FullName =

    FirstName
    > + ' ' + LastName
    > 3. Loads only the record which has the same FullName as the variable Name
    > passed in the URL to this page.
    >
    > My SQL is this:
    >
    > SELECT *, FirstName + ' ' + LastName as FullName
    > FROM people
    > WHERE FirstName + ' ' + LastName = ?
    >
    > and:
    >
    > <Parameter Name="@FullName" Value='<%# IIf((Request.QueryString("Name")

    <>
    > Nothing), Request.QueryString("Name"), "") %>'
    > Type="WChar"/></Parameters></MM:DataSet>
    >
    > Can you please tell me how to do this?
    > I know i allready asked this but until now i got no solution and i need to
    > solve this to finish this web site and deliver it.
    >
    > I hope i was able to explain better my problem.
    >
    > Thank You Very Much,
    > Miguel
    >
    >
    >
    One Handed Man \( OHM - Terry Burns \), Jun 18, 2004
    #2
    1. Advertising

  3. Do you know the strange thing? I tested it and everything works fine...but
    when i was testing in the Dreamweaver window where i place the SQL, i was
    not getting any records...have no idea why is this...but well, at least it's
    working.

    Thanks for eveybody help and patiente...my code is working :)

    Thanks again for your time,
    Miguel

    "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
    news:...
    > Why are you putting the Request.Querystring in a pre-render block, should

    it
    > not be in regular code with the rest of it ? IE
    >
    > Value = Request.QueryString("Name")
    >
    > --
    >
    > OHM ( Terry Burns )
    > . . . One-Handed-Man . . .
    >
    >
    > "Miguel Dias Moura" <> wrote in message
    > news:%...
    > > Hi,
    > >
    > > i created a dataSet in an ASP.Net page which:
    > >
    > > 1. Loads all fields from each database record.
    > > 2. Creates a new field using 2 of the existing fields: FullName =

    > FirstName
    > > + ' ' + LastName
    > > 3. Loads only the record which has the same FullName as the variable

    Name
    > > passed in the URL to this page.
    > >
    > > My SQL is this:
    > >
    > > SELECT *, FirstName + ' ' + LastName as FullName
    > > FROM people
    > > WHERE FirstName + ' ' + LastName = ?
    > >
    > > and:
    > >
    > > <Parameter Name="@FullName" Value='<%#

    IIf((Request.QueryString("Name")
    > <>
    > > Nothing), Request.QueryString("Name"), "") %>'
    > > Type="WChar"/></Parameters></MM:DataSet>
    > >
    > > Can you please tell me how to do this?
    > > I know i allready asked this but until now i got no solution and i need

    to
    > > solve this to finish this web site and deliver it.
    > >
    > > I hope i was able to explain better my problem.
    > >
    > > Thank You Very Much,
    > > Miguel
    > >
    > >
    > >

    >
    >
    Miguel Dias Moura, Jun 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel Dias Moura
    Replies:
    1
    Views:
    353
    Cor Ligthert
    Apr 12, 2004
  2. Miguel Dias Moura
    Replies:
    2
    Views:
    337
    Miguel Dias Moura
    Jun 19, 2004
  3. micky
    Replies:
    12
    Views:
    591
    Damien
    Dec 16, 2005
  4. Replies:
    30
    Views:
    956
    Arne Vajhøj
    Feb 10, 2008
  5. Brett

    Waiting for a site to finish loading

    Brett, May 28, 2005, in forum: Javascript
    Replies:
    3
    Views:
    106
    Randy Webb
    May 28, 2005
Loading...

Share This Page