sql - date time in combobox -


i using visual stdio 2008 , sql server 2005

dim selectquery = "select purchase_master.customer_name, purchase_details.item_code, item_master.name,     purchase_details.quantity, purchase_details.cost, purchase_master.date      item_master inner join (purchase_master inner join purchase_details on     purchase_master.bill_id = purchase_details.bill_id) on item_master.item_code = purchase_details.item_code     purchase_master.date= " + cbopdate.selectedvalue.tostring() 

when selectquery executed gives me error

"error near syntax 12"

my cbopdate combobox binded database return's data , time in "2/18/2011 12:00:00 am"

please me out

i suspect treating delimiter.it better change to

where purchase_master.date=@your_date 

and add date parameter, prevent sql injection attacks , promote plan caching


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -