[AccessD] [dba-SQLServer]Passing the SQL Setting to a stored procedure

Arthur Fuller artful at rogers.com
Wed Mar 5 07:17:00 CST 2003


There's no advantage at all do passing the SQL statement into a sproc for
execution. Aside from security issues, the main reason for using sprocs is
to avoid the overhead of the parsing and compiling. Since there's no way to
optimize the SQL statement you're thinking of sending in, it's pointless.

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Mark L. Breen
Sent: March 5, 2003 7:56 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] [dba-SQLServer]Passing the SQL Setting to a stored
procedure

Hello John,

Why not just pass the SQL raw and not bother with the sp in the first place?

I know that there are pro's and con's to using sp's, but if you are going to
do what you are doing, it seems like it would be just easier to send the raw
SQL.

Of course there are security issues with sending SQL, but leaving that
aside, why not send it raw?

I have not used it, but there is a kind of Execute Command that you can
include in a sp, maybe that could action the parameter that you would pass
in.

Mark



----- Original Message -----
From: "John W. Colby" <jcolby at colbyconsulting.com>
To: "AccessD-SQLServer" <dba-sqlserver at databaseadvisors.com>; "AccessD"
<AccessD at databaseadvisors.com>
Sent: Tuesday, March 04, 2003 10:36 PM
Subject: [AccessD] [dba-SQLServer]Passing the SQL Setting to a stored
procedure


> I just had a fascinating idea.  I do a lot of building up of SQL Strings
> then executing them in A2K.  Would it be possible to build a stored
> procedure where the parameter passed in is the SQL statement to be
executed?
> IOW, do the same thing we do now, manually build a SQL string with the
> actual values of controls in where clauses etc., then pass that string to
a
> stored procedure and have the stored procedure execute the SQL string and
> hand back the data?
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
>
> I've stopped 9,257 spam messages. You can too!
> Get your free, safe spam protection at
http://www.cloudmark.com/spamnetsig/
>
> ----------------------------------------------------
> Is email taking over your day?  Manage your time with eMailBoss.
> Try it free!  http://www.eMailBoss.com
>
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list