![]() |
Taking input
HEY im trying to take input from textbox and then i want to run a query in query in want to search that value
suppose my textbox name is txtInput.text n query which i want to run Code:
string connectionString = "Data Source =USER-PC\\SQLEXPRESS1;Initial Catalog=inFlowInventory; Integrated Security=SSPI"; |
Re: Taking input
lol
wat happn no1 knw dat?? :P |
Re: Taking input
Quote:
Try setting up Parameters like this.. Code:
SqlCommand testCommand =new SqlCommand("SELECT customer FROM Customer where customer =@testCust", testConnection); |
Re: Taking input
Can u tel me 1 more thng i want to use Datagrid view as a Input of data n use of some qurey
supose table column are item, descrptn, price, quantity i want to add 1 more Column which wil do da calculation lyke Total column which wrk iz to calculate da value in Run Tyme price*quantity as Total how can i perform that during insert query tyme |
Re: Taking input
Code:
gridView.Rows[rowIndex].Cells["Calc"].Value=Convert.ToInt32(gridView.Rows[rowIndex].Cells["Price"].Value)*Convert.ToInt32(gridView.Rows[rowIndex].Cells["Quantity"].Value);then during query time you can add gridView.Rows[rowIndex].Cells["Calc"].Value as a parameters. or you can Code:
int Price=Convert.ToInt32(gridView.Rows[rowIndex].Cells["Price"].Value)Code:
|
Re: Taking input
sorry em nt dat much expert can u do it easily or gve me complete codding if u can :(
|
Re: Taking input
thr is error showing in rowIndex
|
Re: Taking input
rowIndex is a local variable which stores the GridView Controls property CurrentRow.Index.
*sorry for taking a while to respond, have been busy* |
Re: Taking input
thnx but can u merge awl thg
n can u do it awl combine wid example |
Re: Taking input
Code:
int rowIndex=gridView.CurrentRow.Index; |
| All times are GMT +5.5. The time now is 05:29. |