G-Lock Software

HomeProductsForumsFAQDownloadsRegistration













 Parse incoming email message - process unsubscribe request
... \ G-Lock Email Processor \ User Guide \ Get Identity Value From Table

If you have worked with MS SQL Server, MS Access, you are probably familiar with Identity columns. The main purpose of these columns is to provide a primary key to the table, when a primary key can not be defined using other fields in the table. The Identity columns are like any other column except that their value is not inserted by the user, but by the system itself.

One of the common question is "How can I get the value of Identity column in the inserted record?" In this topic we will describe the procedures you should follow to extract the value of the Identity column using the Database Manager.

1. In the Field Extractor create an extra field (for example, ID) where Source - Blank Value.

Click OK.

2.  Open the Database Manager and set it as follows:

Select the database, select Action Type - Insert into Table and select your table.

Click OK.

3. Click Identity tab on the Database Manager window. Check Get Identity after insert SQL is executed option and type:

select @@identity as [%ID%] from Mail_list (name of your table)

When a record is inserted into a table with the Identity column, the function @@IDENTITY (or the global variable @@IDENTITY as in SQL Server 6.5) returns the last identity value that was inserted in the database.

Click OK.

ATTENTION!

 

If your database does not support @@IDENTITY function, you can type your own SQL text to extract the value of Identity column, for instance:

Select ID From Mail_list
where email=[%Email%]

    

 

G-Lock Email Processor
  User Guide

Getting Started
Program Main Window
Process Bounced Emails
Process Remove Requests
Process Subscribe Requests
Process Confirmation Letters
Detect and Remove Spam Emails
Creating Accounts
Creating New Rule

Program Settings
General Settings
Inbox Explorer Settings

Setting up Filters
Principle of Email Filtering
Using Regular Expressions
Filter By Size
Filter By Header/Body
Filter By Subject

Setting up Field Extractor
Field Extractor Window
Source Box
Generate Value From Mask
Create Fields From Database
Create Fields From Clipboard
Create Table In External Database

Setting up Fields Processor
General Settings
Script Syntax

Setting up Bounced Emails Processor
Hard & Soft Bounced Emails
Exclusion List

Setting up Actions

MS Windows Script
General Settings

Database Manager
General Settings
Connection Info
Custom SQL
Working With Table In Excel
Get Identity Value From Table

Write To File
General Settings

Save Attachment
General Settings

Forward Email
General Settings
Additional Settings

Send Email
General Settings
Additional Settings
HTML Settings

Log
Outbox
Inbox Explorer

See also

Services
  Registration
Affiliate
 
Support
  Users Forum
Contact us
 
Info
  Trojan Port List
Privacy Statement
Media and Press Information
 
  Add to Favorites
 
 
   
 
 
   

 

Home | Products | Forums | FAQ | Downloads | Registration