E
evandela
Hi evreyone, I am a newbie but my ASP.net is comming on thanks to you
guys and the countless manuals I have downloaded... ummm... I mean
'bought'
I am having a little bit of an issue though, I am sure it is easy to
sort out - but I cant seem to find any info on it.
I have a variable that I would like to insert into the SQL code... but
cant seem to figure out how to do it... this is what my code looks like
right now... if I replace the ? with a product number the SQL query
works.... but I have a variable called SelectedProductID and I need to
find out how to get that into the SQL query
Dim SelectedProductID as Int32 = 4
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
AvaliableColours.SelectCommand = "SELECT colours.colourID as
ALLColourID, colours.colour, avaliableColours.productID,
avaliableColours.colourID FROM colours, avaliableColours WHERE
colours.colourID = avaliableColours.colourID AND
avaliableColours.productID=?"
End Sub
<asp:AccessDataSource ID="AvaliableColours" runat="server"
DataFile="~/App_Data/products.mdb" />
Any ideas ?
guys and the countless manuals I have downloaded... ummm... I mean
'bought'
I am having a little bit of an issue though, I am sure it is easy to
sort out - but I cant seem to find any info on it.
I have a variable that I would like to insert into the SQL code... but
cant seem to figure out how to do it... this is what my code looks like
right now... if I replace the ? with a product number the SQL query
works.... but I have a variable called SelectedProductID and I need to
find out how to get that into the SQL query
Dim SelectedProductID as Int32 = 4
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
AvaliableColours.SelectCommand = "SELECT colours.colourID as
ALLColourID, colours.colour, avaliableColours.productID,
avaliableColours.colourID FROM colours, avaliableColours WHERE
colours.colourID = avaliableColours.colourID AND
avaliableColours.productID=?"
End Sub
<asp:AccessDataSource ID="AvaliableColours" runat="server"
DataFile="~/App_Data/products.mdb" />
Any ideas ?