Thanks Md. Marufuzzaman, I Created a procedure instead of Trigger along with the generator and called the procedure from the front end for autonumber, it works fine. Thanks A Lot.
ksenthilbabu
Posts
-
Fetch Autonumber from Firebird ? -
How to sent Mail in VB6.0Hey Kannan, Use this class, which i use for the same from VB
Option Explicit
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
'Delivery Status Notifications
' In order to use the Delivery Status Notifications (Return
' Receipt and Delivery Disposition requests)
Const cdoDSNDefault = 0 'None
Const cdoDSNNever = 1 'None
Const cdoDSNFailure = 2 'Failure
Const cdoDSNSuccess = 4 'Success
Const cdoDSNDelay = 8 'Delay
Const cdoDSNSuccessFailOrDelay = 14 'Success, failure or delayPrivate mvarCONNECTION_TIMEOUT As Integer 'local copy
'local variable(s) to hold property value(s)
Private mvarMail_Password As String 'local copy
Private mvarMail_UserName As String 'local copy
'local variable(s) to hold property value(s)
Private mvarSMTP_ServerName As String 'local copy
Private mvarSMTP_ServerPort As Integer 'local copy
'local variable(s) to hold property value(s)
Private mvarMail_Attachments As Variant 'local copy
'local variable(s) to hold property value(s)
Private mvarMail_FromName As String 'local copy
'local variable(s) to hold property value(s)
Private mvarMail_To As String 'local copy
Private mvarMail_Cc As String 'local copy
Private mvarMail_Bcc As String 'local copy
'local variable(s) to hold property value(s)
Private mvarMail_Subject As String 'local copy
Private mvarMail_Message As String 'local copy
Public Property Let Mail_Message(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.Mail_Message = 5
10 mvarMail_Message = vData
End PropertyPublic Property Get Mail_Message() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.Mail_Message
10 Mail_Message = mvarMail_Message
End PropertyPublic Property Let Mail_Subject(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.Mail_Subject = 5
10 mvarMail_Subject = vData
End PropertyPublic Property Get Mail_Subject() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X -
Fetch Autonumber from Firebird ?i am developing a project with VB6 and Firebird 2.1.3. When i update the table tblPartyMaster and examines the adoRsParty!PartyID which is a primary key,autoincrement, unique identifier returns 0 (Zero) instead of New PartyID Value which i need for further processing.
With adoRsParty
.AddNew
!CompanyName="Sample Company"
.Update
msgbox !PartyID
End WithI have create a Generator for PartyID and a Before Insert Trigger on table tblpartyMaster as
CREATE TRIGGER TR_AI_TBLPARTYMASTER_PARTYID FOR TBLPARTYMASTER
ACTIVE BEFORE INSERT
POSITION 0
AS
BEGIN
NEW.PARTYID = GEN_ID(GEN_TBLPARTYMASTER_PARTYID, 1);
ENDPlease Suggest me some ideas for fetching the PrimaryKey (PartyID) Value of newly inserted row. Expecting some advice or ideas or guidance With regards K.Senthil Babu