Hi all,
I am working on my application and it's going quite smoothly but I can't help getting the feeling that I am doing my SQL queries inefficiently..
Example:
When leaving a textbox I would like to check that the value entered in that box is present in the column of my customers table. At the moment I have a stored procedure with this code...
I have then attached this to my customers tableadapter in VS. This is then called from the textbox_leave procedure.
Should I be doing this query directly in the procedure instead of through tableadapter/stored procedure.
Any help/advice would be really appreciated.
Thanks
John
.NET 2.0, Visual Studio 2005, SQL Server 2005 Express
I am working on my application and it's going quite smoothly but I can't help getting the feeling that I am doing my SQL queries inefficiently..
Example:
When leaving a textbox I would like to check that the value entered in that box is present in the column of my customers table. At the moment I have a stored procedure with this code...
Code:
SELECT COUNT(*) AS Expr1
FROM tblCustomers
WHERE (Cust_Code = @Param1)
Should I be doing this query directly in the procedure instead of through tableadapter/stored procedure.
Any help/advice would be really appreciated.
Thanks
John
.NET 2.0, Visual Studio 2005, SQL Server 2005 Express