📄 templates.ini
字号:
[INSTRUCTIONS]
This list is for the creation of the default GET, INS, UPD, or DEL procedure.
Modification should not be attempted without knowledge of how to use
this file.
NOTE: The macro delimiter is <delimiter word>. The defined delimiter words are:
~ - a blank line.
<sp_procedure_name> defaults to the name of the table + $ + ini section header.
<parameters> defaults to the user selected fields in the details pane.
The standard format is "@field datatype,"
<modification_stamp> Will put in the login user id, date, and 'Created'.
<field_list> All fields for table listed "field,".
<alias_name> The table name.
<PK_field=parameter> The primary key fields listed with the corresponding parameter.
"PKfield = @parameter".
<PK_field> The primary key fields "PKfield,".
<field=parameter> Used in 'where' clause. "field = @parameter".
[GET]
NAME=Get Procedure
DESCR=Get Procedure Template
TEXT1=CREATE PROCEDURE <sp_procedure_name>
TEXT2=(
TEXT3=<parameters>
TEXT4=)
TEXT5=AS
TEXT6=---------------------------------------------------------------------------------------------------------------
TEXT7=-- Description
TEXT8=-- Create Procedure Template
TEXT9=--
TEXT10=-- Implementation Notes
TEXT11=--
TEXT12=-- Results Sets
TEXT13=-- none
TEXT14=--
TEXT15=-- Returns
TEXT16=-- 0 if successful, -1 to -99 for system errors
TEXT17=-- -100 record could not be inserted
TEXT18=--
TEXT19=-- Modification Log
TEXT20=--
TEXT21=-- Name Date Modification
TEXT22=-- ------ ------------- ----------------------------
TEXT23=-- <modification_stamp>
TEXT24=---------------------------------------------------------------------------------------------------------------
TEXT25=~
TEXT26=--Turns off the message returned at the end of each
TEXT27=--statement that states how many rows were affected
TEXT28=set nocount on
TEXT29=~
TEXT30=--this is the value that will be returned in return
TEXT31=declare @returnVal int
TEXT32=select @returnVal = 0
TEXT33=~
TEXT34=SELECT
TEXT35=<field_list>
TEXT36=FROM <alias_name>
TEXT37=WHERE <PK_field=parameter>
TEXT38=ORDER BY <PK_field>
TEXT39=~
TEXT40=RETURN @returnVal
[INS]
NAME=Insert Procedure
DESCR=Insert Procedure Template
TEXT1=CREATE PROCEDURE <sp_procedure_name>
TEXT2=(
TEXT3=<parameters>
TEXT4=)
TEXT5=AS
TEXT6=---------------------------------------------------------------------------------------------------------------
TEXT7=-- Description
TEXT8=-- Insert Procedure Template
TEXT9=--
TEXT10=-- Implementation Notes
TEXT11=--
TEXT12=-- Results Sets
TEXT13=-- none
TEXT14=--
TEXT15=-- Returns
TEXT16=-- 0 if successful, -1 to -99 for system errors
TEXT17=-- -100 record could not be inserted
TEXT18=--
TEXT19=-- Modification Log
TEXT20=--
TEXT21=-- Name Date Modification
TEXT22=-- ------ ------------- ----------------------------
TEXT23=-- <modification_stamp>
TEXT24=---------------------------------------------------------------------------------------------------------------
TEXT25=~
TEXT26=--Turns off the message returned at the end of each
TEXT27=--statement that states how many rows were affected
TEXT28=set nocount on
TEXT29=~
TEXT30=--this is the value that will be returned in return
TEXT31=declare @returnVal int
TEXT32=select @returnVal = 0
TEXT33=~
TEXT34=INSERT INTO <alias_name>
TEXT35=(
TEXT36=<field_list>
TEXT37=) VALUES (
TEXT38=<field=parameter>
TEXT39=)
TEXT40=~
TEXT41=RETURN @returnVal
[UPD]
NAME=Update Procedure
DESCR=Update Procedure Template
TEXT1=CREATE PROCEDURE <sp_procedure_name>
TEXT2=(
TEXT3=<parameters>
TEXT4=)
TEXT5=AS
TEXT6=---------------------------------------------------------------------------------------------------------------
TEXT7=-- Description
TEXT8=-- Update Procedure Template
TEXT9=--
TEXT10=-- Implementation Notes
TEXT11=--
TEXT12=-- Results Sets
TEXT13=-- none
TEXT14=--
TEXT15=-- Returns
TEXT16=-- 0 if successful, -1 to -99 for system errors
TEXT17=-- -100 record could not be inserted
TEXT18=--
TEXT19=-- Modification Log
TEXT20=--
TEXT21=-- Name Date Modification
TEXT22=-- ------ ------------- ----------------------------
TEXT23=-- <modification_stamp>
TEXT24=---------------------------------------------------------------------------------------------------------------
TEXT25=~
TEXT26=--Turns off the message returned at the end of each
TEXT27=--statement that states how many rows were affected
TEXT28=set nocount on
TEXT29=~
TEXT30=--this is the value that will be returned in return
TEXT31=declare @returnVal int
TEXT32=select @returnVal = 0
TEXT33=~
TEXT34=UPDATE <alias_name>
TEXT35=SET <field=parameter>
TEXT36=WHERE <PK_field=parameter>
TEXT37=~
TEXT38=RETURN @returnVal
[DEL]
NAME=Delete Procedure
DESCR=Delete Procedure Template
TEXT1=CREATE PROCEDURE <sp_procedure_name>
TEXT2=(
TEXT3=<parameters>
TEXT4=)
TEXT5=AS
TEXT6=---------------------------------------------------------------------------------------------------------------
TEXT7=-- Description
TEXT8=-- Delete Procedure Template
TEXT9=--
TEXT10=-- Implementation Notes
TEXT11=--
TEXT12=-- Results Sets
TEXT13=-- none
TEXT14=--
TEXT15=-- Returns
TEXT16=-- 0 if successful, -1 to -99 for system errors
TEXT17=-- -100 record could not be inserted
TEXT18=--
TEXT19=-- Modification Log
TEXT20=--
TEXT21=-- Name Date Modification
TEXT22=-- ------ ------------- ----------------------------
TEXT23=-- <modification_stamp>
TEXT24=---------------------------------------------------------------------------------------------------------------
TEXT25=~
TEXT26=--Turns off the message returned at the end of each
TEXT27=--statement that states how many rows were affected
TEXT28=set nocount on
TEXT29=~
TEXT30=--this is the value that will be returned in return
TEXT31=declare @returnVal int
TEXT32=select @returnVal = 0
TEXT33=~
TEXT34=DELETE FROM <alias_name>
TEXT35=WHERE <PK_field=parameter>
TEXT36=~
TEXT37=RETURN @returnVal
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -