OK I now have changed the code to match your suggestion, but am getting an expected ')' at the end of the objcomm line that I don't get. Its a simple syntax thing, but not sure how to fix it. Here is the new code:
Main Topics
Browse All TopicsHello,
I am very new to ASP.NET but have been doing ASP classic for years. I am trying to setup my first simple .NET page displaying data from a SQL database. I am used to do set RS = Server.CreateObject("ADODB
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
And connection string line SHOULD NOT LOOK LIKE THIS:
Dim objconn As New System.Data.SqlClient.SqlC
it is expecting a string value so change to:
Dim objconn As New System.Data.SqlClient.SqlC
Business Accounts
Answer for Membership
by: rafayaliPosted on 2009-10-28 at 10:24:05ID: 25685801
Just append the querystrings to the sql statement ) + " and month= " + request.querystring("month ") + ";"
onnection( connection String:=) ommand(("s elect * from dbo.dashboardview where facilityid=1 and year=@year and month=@month", objconn) Value("@ye ar", Request.QueryString("year" )) Value("@mo nth", Request.QueryString("month ")) ataReader = objcomm.ExecuteReader() r
sqlquery = "select * from dbo.dashboardview where facilityid=1 and year=" + request.querystring("year"
A better approach would be to use sqlparameters.
Dim objconn As New System.Data.SqlClient.SqlC
Dim objcomm As New System.Data.SqlClient.SqlC
objcomm.Parameters.AddWith
objcomm.Parameters.AddWith
Dim reader As System.Data.SqlClient.SqlD
repeater1.datasource=reade
repeater1.databind()
Place code in a page event where you want it to happen.