i am new to asp.net but have some problem in asp.net coding
i want to acess the mysql database data using asp.net coding.
i write like this
Dim cmd As OdbcCommand = New OdbcCommand("select * from nysemin where date='2009-09-14' and ticker_symbol='acc' ", con)
the above code is like hardcoding manually.but i need dynamically
i tried like this
Dim cmd As OdbcCommand = New OdbcCommand("select * from nse_und_5min where date="&da&" and ticker_symbol='acc' ", con)
but error is showing
how to complete the above requirement ie passing date value into dynamically in that query.
i will explain clearly i have one dropdown list in that list i have INDIA,USA,UK,UAE options are there when ever the
user select particular option i need to pass that option into query and get the values from database.
so i need dynamic value passing into that query.how to write for in ASP.net
in java we write like
String ss="Select * from emp where empno='"+Empno[i]+"' and salary="20000" ";
but i am new toasp.net how it is possible.
i tried like this but giveing error
dim strQuery = string.Format("select * from nysemin where symbol='&Empno&' and ticker_symbol='acc'", da)
hi , i have some problem in getting the selected values of my ListBox
i use some code like this : ListBox1.SelectedValue
but it just gives me the first selected value !
my list box is in multiple mode and user can select some coises !!!
how can i get the whole of selected values without using for cycle ?!
First of all, post your question in the right forum.
Next, buy a good book and start reading it.
After that, when you have some problem, mention the problem in the correct problem in CP and people will be more tha happy to help you.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.