Assigning Context.Items Value To SQL Query
Hi all,
Can anyone help me out with this? I have passed a value from a previous page and want to use it in an SQL query on Page load, here's some code to show you what I mean
dim Str1 as String
Str1 = Context.Items("appt_date")
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=D:\Inetpub\wwwroot\WebApplication1\Medical. mdb;")
dbconn.Open()
sql="SELECT * FROM Appointment WHERE appointment_date= '+ Str1 +' "
Thought I could maybe assign the value to a string first or maybe it can't be done like this, can anyone help??
|