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

M

Miguel Dias Moura

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
 
O

One Handed Man \( OHM - Terry Burns \)

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 . . .
 
M

Miguel Dias Moura

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top