Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DetailsView use login credentials

Status
Not open for further replies.

rromeo407

Programmer
May 7, 2012
2
US
I am trying to use the detailsView to allow members who are logged in to edit there account but the problem im getting is that whoever logs in it always shows the very "1st" record . I am trying to use unique email to get to the right profile but i keep getting an error it says "Must declare the scalar variable "@email " . The part of the code that im having trouble with is ... the 3rd line any help ..
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:realestate %>"
SelectCommand="SELECT * FROM [buyer] Where = @email"
UpdateCommand="UPDATE [buyer] SET [email] = @email, [minimum] = @minimum, [maximum] = @maximum, [cityone] = @cityone, [citytwo] = @citytwo, [citythree] = @citythree, [propertytype] = @propertytype, [prequalified] = @prequalified, [amount] = @amount, [realtor] = @realtor, [bedrooms] = @bedrooms, [bathrooms] = @bathrooms, [propertyage] = @propertyage, [financing] = @financing, [closedate] = @closedate, [details] = @details, [datemade] = @datemade WHERE [email] = @email">
<DeleteParameters>
 
I don't use the data source controls for this very reason, and many others. Write the SQL yourself. You will learn more, and have maintainable, debuggable code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top