Start and End SQL Commands

Enter SQL command or stored procedure ff you want to use a specific SQL Command for Start or End of Sync.

Start SQL command will be executed after connection has been established , but before any sync action, End SQL will be executed after

all sync action are finished.


End SQL Statement won't be executed on errors or user abort (Cancel button pressed )!


 

If you click the “Insert dynamic parameters” menu/button, GeniusConnect will insert all dynamic parameters. GeniusConnect will replace the parameters with Outlook values during the execution. See Filter rows for more info about dynamic parameters.

 

Note:
Dynamic parameters can be used because they depend on Folder(Folder name..), Outlook (Outlook user..) or PC (NT User..) values and not on individual item values.


Use the "Test..." button to check your SQL syntax, any dynamic parameter will be replaced with Outlook value and statement will be executed, you will see results if successful or error from your database.

 


Examples:

ODBC syntax to execute a stored procedure:
{call spMyStart ('{OUTLOOK_FOLDER_NAME}')}

 

SQL Server syntax to execute a stored procedure:
EXECUTE spMyEnd ('{OUTLOOK_FOLDER_NAME}')



For advanced users:
Dynamic parameters defined in Filter rows can be used and will be replaced with run-time values.



SQL Server Example for simple Start/End database log:


SQL Server Table script:

/****** Object:  Table [dbo].[SyncLog] ******/

SET ANSI_NULLS ON

GO


SET QUOTED_IDENTIFIER ON

GO


CREATE TABLE [dbo].[SyncLog](

       [Id] [int] IDENTITY(1,1) NOT NULL,

       [Folder] [nvarchar](max) NOT NULL,

       [Type] [nchar](10) NOT NULL,

       [TimeLog] [datetime] NOT NULL,

 CONSTRAINT [PK_SyncLog] PRIMARY KEY CLUSTERED 

(

       [Id] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO


ALTER TABLE [dbo].[SyncLog] ADD CONSTRAINT [DF_SyncLog_TimeLog]  DEFAULT (getdate()) FOR [TimeLog]

GO




Start SQL:

INSERT INTO [dbo].[SyncLog] ([Folder],[Type])  VALUES  ( '{OUTLOOK_FOLDER_FULL}', 'Start' )


End SQL:

INSERT INTO [dbo].[SyncLog] ([Folder],[Type])  VALUES  ( '{OUTLOOK_FOLDER_FULL}', 'Stopt' )