Hi,
can anyone help me please... i am unsure how to define a
variable in ASP.NET... i have designed a page which uses
OleDb to retrieve and display data from an access
database and now i wish to select and filter a specific
field... My Code...
<script runat="server">
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=" &
server.mappath("gigs.mdb"))
dbconn.Open()
sql="SELECT * FROM gigs"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
gigs.DataSource=dbread
gigs.DataBind()
dbread.Close()
dbconn.Close()
end sub
sub getvenue_click (Sender As Object, E As EventArgs)
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;data source=" &
server.mappath("gigs.mdb"))
dbconn.Open()
sql="SELECT * FROM gigs where venue = ???"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
gigs.DataSource=dbread
gigs.DataBind()
dbread.Close()
dbconn.Close()
end sub
</script>
as you can see there is a line which says "sql = SELECT *
FROM gigs where venue = ???"
I have a dropdown list called "MyDDL"
so in Visual Basic i would simply say
dim myselection
myselection = MyDDL.Value
venue = myselection
I basically need to know how to say the same thing in ASP?
Any help would be appreciated... please e-mail me with
anything... jdmurphy666(at)netscape(dot)net
Thanks