Peter,
Fair enough. What are the advantages to doing it this way, as opposed to the
way I'm doing it currently? Could you point me at a descent tutorial?
Also, would I not be better switching to linq?!
Thanks,
Dan
"Peter Bromberg [C# MVP]" wrote:
You need to invest in taking your programming expertise to the next level by
starting to use parameterized queries instead of concatenating textual Sql
statements.
-- Peter
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
MetaFinder:
http://www.blogmetafinder.com
>
>
"musosdev" wrote:
>
Hi,
I'm trying to fill my Repeater control with the contents of a query
performed on an OleDB connected database. I keep getting the error...
"No value given for one or more required parameters." - but I can't work out
what parameters where. Can someone help?
<html>...
<asp:Repeater ID="rptLinks" runat="server">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "site_url") %>
</ItemTemplate>
</asp:Repeater>
c#...
OleDbConnection dbConn = new
OleDbConnection(ConfigurationSettings.AppSettings. Get("System_ConnectionString"));
dbConn.Open();
OleDbCommand siteCmd = new OleDbCommand("SELECT site_name, site_url FROM
sites WHERE band_id = " + bandid, dbConn);
OleDbDataReader siteDR = siteCmd.ExecuteReader();
rptLinks.DataSource = siteDR;
rptLinks.DataBind();
dbConn.Close();
Thanks for any help!