Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i have a datagridview i change query by "Add query" , i write this code in query builder :

VB
SELECT * FROM table1 WHERE ID_key = convert.toint32("& txt_id.TEXT &")


but its Not working

And then i try this one :

VB
i=txt_id.text
SELECT * FROM table1 WHERE ID_key = i


Not working Yet...

what do i do for this problem ?

Thank You-
Posted
Updated 16-Nov-11 4:44am
v2
Comments
Pandya Anil 16-Nov-11 9:24am    
what is the error, post it too.

Debug your code to get the value of i and txt_id.TEXT.
Paste these queries in the SQL backend and run them there.

This will give you an idea if the query is working or not.
 
Share this answer
 
In general, stored procedure will be good choice on parametrized query operation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900