Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Access to Sql server.. udf/stored proc/views etc

Author  Topic 

munkee
Starting Member

5 Posts

Posted - 2011-10-17 : 16:39:34
Hi all,

I am jumping in to the world of SQL server with an access front end. I am going to be converting an existing database over so we can use it across a wide area network.

I have been doing a lot of reading around stored procedures, user defined functions, views and pass through queries.

All of the information in isolation has been great and not so hard to understand at a glance but now I have come to the point I am trying to differentiate all of these options to come up with the best solution for my app.

For anyone who has done the conversion from a mdb to sql server what are the general situations when you would typically use each of the above options? I can see how a view is beneficial purely for narrowing down your large tables in to workable columns but what about the others?

Also would you be able to comment on their general performance? My database contains both in line sql statements within VBA which may require parameters, but it also contains standard access querydefs which may also require parameters.

Thanks for any help,

Chris

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-10-18 : 00:40:15
Stored procedures is a collection of t-sql statements. A stored procedure has accepts and resturns parameters.They are either permanent or temporary.
A user-defined function (UDF) is a database object offering reusable code - and is implemented in a number of ways , such as in SELECT statements, applications etc
Firstly, ensure you grasp the difference and use appropriately, there is good in information in SQL Server Books Online. Secondly , optimising the code is dependant on solid code implementation and optimising the underlying objects such as index.
There are various models of how to implement the code - and cause debates , such as : a)should business logic be maintained in the database or in the application ?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -