Storing TSQL in a database
Is it a bad idea to put TSQL in a database? For example, please see the
DDL below:
CREATE TABLE dbSystems (ID INT NOT NULL IDENTITY, Description
VARCHAR(100), SQL (10000))
INSERT INTO dbSystems ('Sales System', 'DECLARE SalesVariable
int..............")
INSERT INTO dbSystems ('Finance System', 'DECLARE FinanceVariable
int..............")
INSERT INTO dbSystems ('Production System', 'DECLARE ProductionVariable
int..............")
A VB.NET app would then be able to choose the SQL to run at runtime.
Alternatively, in the SQL field I could contain the name of a stored
procedure and the VB.NET app could execute the stored procedure instead.
No comments:
Post a Comment