TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dan Mc
NA
1
0
Display SQL statement on aspx page for debugging with ado.net
Oct 10 2007 12:04 PM
Hello.
I have a sql statement which are using variables from form Data. I would like to output the sql query on the webpage for debugging.
objCmd = new SqlCommand("SELECT DISTINCT PROV_SPECIALTIES.LAST_NAME, PROV_SPECIALTIES.PHYS_STATE, PROV_SPECIALTIES.ZIP, PROV_SPECIALTIES_FINAL.SPECIALTIES, LEFT OUTER JOIN PROV_SPECIALTIES_FINAL ON PROV_SPECIALTIES.PROV_ID = PROV_SPECIALTIES_FINAL.PROV_ID WHERE (PROV_SPECIALTIES.ZIP LIKE '%' + @ZIP + '%') AND (PROV_SPECIALTIES.PHYS_STATE = @State) AND (PROV_SPECIALTIES.SPECIALTY IN (@SPECIALTYSELECTED))", objConn);
objCmd.Parameters.Add("@ZIP" , txtSearch.Text);
objCmd.Parameters.Add("@STATE", ddlState.SelectedItem.Value);
objCmd.Parameters.Add("@SPECIALTYSELECTED", lbSpecialty.SelectedItem.Value);
I would like to do something like Response.Write(objCmd)
My hangup is I want to see if @SPECIALTYSELECTED are pulling the values from the listbox control and using them in the SQL statement.
Thanks.
Reply
Answers (
1
)
access from one of this childs to a method in Master Form
C# Pattern To Track Multi-Step Process in App? Mediator?