Loading ...
Sorry, an error occurred while loading the content.

RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

Expand Messages
  • Marc Trollip
    Yes I am - but using the recordset object so I can have the details after the SP has run returned to the asp page. Just sent the ASP code in my last post .
    Message 1 of 4 , Oct 30, 2003
    • 0 Attachment
      Message

      Yes I am – but using the recordset object so I can have the details after the SP has run returned to the asp page.

       

      Just sent the ASP code in my last post …

       

      Always at your service,

      Marc Trollip (Director)
      http://www.i-ballmedia.com
      http://www.blackwidow.co.za/

      "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

       

      "Every man dies. Not every man really lives" - William Wallace

       

      Disclaimer and confidentiality note

      Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

       

       

       

      -----Original Message-----
      From: Richard Rogers [mailto:rrogers@...]
      Sent: 30 October 2003 09:12 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

       

      Are you executing the stored procedure via ASP (such as setMyRecordset = MyConnection.Execcute 'usp..')?

      -----Original Message-----
      From: Marc Trollip [mailto:webmaster@...]
      Sent: Thursday, October 30, 2003 1:08 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

      Yes,

       

      At the bottom of the SP you will see that I assign the @@error code to a local variable @rc and return this along with my recordset.

       

      In query analyser I see the results and the recordset no problem - but my ASP page sees the recordset state as being closed (equal to zero) ??

       

      Always at your service,

      Marc Trollip (Director)
      http://www.i-ballmedia.com
      http://www.blackwidow.co.za/

      "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

       

      "Every man dies. Not every man really lives" - William Wallace

       

      Disclaimer and confidentiality note


      Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

       

       

       

      -----Original Message-----
      From: Richard Rogers [mailto:rrogers@...]
      Sent: 30 October 2003 08:54 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

       

      Are you returning the @@Error into a recordset?

      -----Original Message-----
      From: Marc Trollip [mailto:webmaster@...]
      Sent: Thursday, October 30, 2003 12:55 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine - but ASP call fails?
      Importance: High

      Hey Brains!

       

      I have an SQL SP which I have written to mirror a record coming in from a remote server to the local server. When I run the following in Query Analyzer - it produces a record/row no problem - but my ASP page sees the recordset as being closed?

       

      Any ideas?

       

      CREATE PROCEDURE usp_MirrorRegRecord

        @RegistrationID bigint,

        @RegFullName varchar(50),

        @RegEmail varchar(50),

        @RegAge int,

        @RegGender int,

        @RegPop int,

        @RegIncome int,

        @RegCountry int,

        @RegRegion bigint,

        @RegUserName varchar(50),

        @RegPassword varchar(50),

        @RegDate datetime,

        @RegIpAddress varchar(50),

        @RegOpSys int,

        @RegBrowser int,

        @RegFlash int,

        @RegScreenWidth int,

        @RegScreenDepth int,

        @RecordLocation as varchar(20)

      AS

        DECLARE @rc int

          SELECT @rc = 0

       

      BEGIN TRANSACTION AddRegistrationRecord

       

            INSERT INTO dbo.bt_Registrations (RegistrationID, RegFullName, RegEmail, RegAge, RegGender, RegPop, RegIncome, RegCountry,

                                        RegRegion, RegUserName, RegPassword, RegDate, RegIpAddress, RegOpSys, RegBrowser, RegFlash, RegScreenWidth, RegScreenDepth)

            VALUES (@RegistrationID, @RegFullName, @RegEmail, @RegAge, @RegGender, @RegPop, @RegIncome, @RegCountry,@RegRegion, @RegUserName,

                            @RegPassword, @RegDate, @RegIpAddress, @RegOpSys, @RegBrowser, @RegFlash, @RegScreenWidth, @RegScreenDepth)

            if (@@ERROR <> 0)                

                BEGIN

                   ROLLBACK TRANSACTION AddRegistrationRecord

                   select @rc = @@Error

                   Goto OnExit  

                END

        COMMIT TRANSACTION AddRegistrationRecord

        OnExit:

         -- Return a recordset to the application for final processing of the mailer. If there was an error mirroring the record

         -- The row will be empty except for the MirrorErrorCode column which will be a value greater than zero. Zero means the

         -- Mirror was sucessfully completed.

         IF (@rc <> 0)

           BEGIN

              SELECT @RecordLocation = 'FAIL'

           END

           ELSE

           BEGIN

             SET @RecordLocation = 'Mirror'

             Select *, @rc AS MirrorErrorCode, @RecordLocation AS RecordLocation, @@SERVERNAME AS SqlServerName 

             FROM dbo.bt_registrations WHERE RegEmail = @RegEmail 

           END

       

       

       

      Always at your service,

      Marc Trollip (Director)
      http://www.i-ballmedia.com
      http://www.blackwidow.co.za/

      "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

       

      "Every man dies. Not every man really lives" - William Wallace

       

      Disclaimer and confidentiality note



      Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

       

       

      .

       

       



      To unsubscribe from this group, send an email to:
      SQLQueriesNoCode-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

      NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. The contents of this e-mail are confidential. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Please virus check all attachments to prevent widespread contamination and corruption of files and operating systems!



      To unsubscribe from this group, send an email to:
      SQLQueriesNoCode-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

       

       

       

      -----Original Message-----
      From: Richard Rogers [mailto:rrogers@...]
      Sent: 30 October 2003 08:54 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

       

      Are you returning the @@Error into a recordset?

      -----Original Message-----
      From: Marc Trollip [mailto:webmaster@...]
      Sent: Thursday, October 30, 2003 12:55 PM
      To: SQLQueriesNoCode@yahoogroups.com
      Subject: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine - but ASP call fails?
      Importance: High

      Hey Brains!

       

      I have an SQL SP which I have written to mirror a record coming in from a remote server to the local server. When I run the following in Query Analyzer - it produces a record/row no problem - but my ASP page sees the recordset as being closed?

       

      Any ideas?

       

      CREATE PROCEDURE usp_MirrorRegRecord

        @RegistrationID bigint,

        @RegFullName varchar(50),

        @RegEmail varchar(50),

        @RegAge int,

        @RegGender int,

        @RegPop int,

        @RegIncome int,

        @RegCountry int,

        @RegRegion bigint,

        @RegUserName varchar(50),

        @RegPassword varchar(50),

        @RegDate datetime,

    • Marc Trollip
      PROBLEM SOLVED!!! No idea why but I think the SET NOCOUNT command sent by Ryan seems to have worked?? Can anyone tell me why this happened? Always at your
      Message 2 of 4 , Oct 30, 2003
      • 0 Attachment
        Message

        PROBLEM SOLVED!!!

         

        No idea why but I think the SET NOCOUNT command sent by Ryan seems to have worked??

         

        Can anyone tell me why this happened?

         

        Always at your service,

        Marc Trollip (Director)
        http://www.i-ballmedia.com
        http://www.blackwidow.co.za/

        "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

         

        "Every man dies. Not every man really lives" - William Wallace

         

        Disclaimer and confidentiality note

        Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

         

         

         

        -----Original Message-----
        From: Marc Trollip [mailto:webmaster@...]
        Sent: 30 October 2003 09:21 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

         

        Yes I am – but using the recordset object so I can have the details after the SP has run returned to the asp page.

         

        Just sent the ASP code in my last post …

         

        Always at your service,

        Marc Trollip (Director)
        http://www.i-ballmedia.com
        http://www.blackwidow.co.za/

        "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

         

        "Every man dies. Not every man really lives" - William Wallace

         

        Disclaimer and confidentiality note

        Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

         

         

         

        -----Original Message-----
        From: Richard Rogers [mailto:rrogers@...]
        Sent: 30 October 2003 09:12 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

         

        Are you executing the stored procedure via ASP (such as setMyRecordset = MyConnection.Execcute 'usp..')?

        -----Original Message-----
        From: Marc Trollip [mailto:webmaster@...]
        Sent: Thursday, October 30, 2003 1:08 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

        Yes,

         

        At the bottom of the SP you will see that I assign the @@error code to a local variable @rc and return this along with my recordset.

         

        In query analyser I see the results and the recordset no problem - but my ASP page sees the recordset state as being closed (equal to zero) ??

         

        Always at your service,

        Marc Trollip (Director)
        http://www.i-ballmedia.com
        http://www.blackwidow.co.za/

        "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

         

        "Every man dies. Not every man really lives" - William Wallace

         

        Disclaimer and confidentiality note


        Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

         

         

         

        -----Original Message-----
        From: Richard Rogers [mailto:rrogers@...]
        Sent: 30 October 2003 08:54 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

         

        Are you returning the @@Error into a recordset?

        -----Original Message-----
        From: Marc Trollip [mailto:webmaster@...]
        Sent: Thursday, October 30, 2003 12:55 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine - but ASP call fails?
        Importance: High

        Hey Brains!

         

        I have an SQL SP which I have written to mirror a record coming in from a remote server to the local server. When I run the following in Query Analyzer - it produces a record/row no problem - but my ASP page sees the recordset as being closed?

         

        Any ideas?

         

        CREATE PROCEDURE usp_MirrorRegRecord

          @RegistrationID bigint,

          @RegFullName varchar(50),

          @RegEmail varchar(50),

          @RegAge int,

          @RegGender int,

          @RegPop int,

          @RegIncome int,

          @RegCountry int,

          @RegRegion bigint,

          @RegUserName varchar(50),

          @RegPassword varchar(50),

          @RegDate datetime,

          @RegIpAddress varchar(50),

          @RegOpSys int,

          @RegBrowser int,

          @RegFlash int,

          @RegScreenWidth int,

          @RegScreenDepth int,

          @RecordLocation as varchar(20)

        AS

          DECLARE @rc int

            SELECT @rc = 0

         

        BEGIN TRANSACTION AddRegistrationRecord

         

              INSERT INTO dbo.bt_Registrations (RegistrationID, RegFullName, RegEmail, RegAge, RegGender, RegPop, RegIncome, RegCountry,

                                          RegRegion, RegUserName, RegPassword, RegDate, RegIpAddress, RegOpSys, RegBrowser, RegFlash, RegScreenWidth, RegScreenDepth)

              VALUES (@RegistrationID, @RegFullName, @RegEmail, @RegAge, @RegGender, @RegPop, @RegIncome, @RegCountry,@RegRegion, @RegUserName,

                              @RegPassword, @RegDate, @RegIpAddress, @RegOpSys, @RegBrowser, @RegFlash, @RegScreenWidth, @RegScreenDepth)

              if (@@ERROR <> 0)                

                  BEGIN

                     ROLLBACK TRANSACTION AddRegistrationRecord

                     select @rc = @@Error

                     Goto OnExit  

                  END

          COMMIT TRANSACTION AddRegistrationRecord

          OnExit:

           -- Return a recordset to the application for final processing of the mailer. If there was an error mirroring the record

           -- The row will be empty except for the MirrorErrorCode column which will be a value greater than zero. Zero means the

           -- Mirror was sucessfully completed.

           IF (@rc <> 0)

             BEGIN

                SELECT @RecordLocation = 'FAIL'

             END

             ELSE

             BEGIN

               SET @RecordLocation = 'Mirror'

               Select *, @rc AS MirrorErrorCode, @RecordLocation AS RecordLocation, @@SERVERNAME AS SqlServerName 

               FROM dbo.bt_registrations WHERE RegEmail = @RegEmail 

             END

         

         

         

        Always at your service,

        Marc Trollip (Director)
        http://www.i-ballmedia.com
        http://www.blackwidow.co.za/

        "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

         

        "Every man dies. Not every man really lives" - William Wallace

         

        Disclaimer and confidentiality note



        Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

         

         

        .

         

         



        To unsubscribe from this group, send an email to:
        SQLQueriesNoCode-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

        NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. The contents of this e-mail are confidential. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Please virus check all attachments to prevent widespread contamination and corruption of files and operating systems!



        To unsubscribe from this group, send an email to:
        SQLQueriesNoCode-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

         

         

         

        -----Original Message-----
        From: Richard Rogers [mailto:rrogers@...]
        Sent: 30 October 2003 08:54 PM
        To: SQLQueriesNoCode@yahoogroups.com
        Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?


        (Message over 64 KB, truncated)

      • Tony Carter
        Messagethe row count messages that appear in QA get sent back in the record set object.. the NOCOUNT stops this.. ... From: Marc Trollip
        Message 3 of 4 , Nov 5, 2003
        • 0 Attachment
          Message
          the row count messages that appear in QA get sent back in the record set object.. the NOCOUNT stops this..
          -----Original Message-----
          From: Marc Trollip [mailto:webmaster@...]
          Sent: 31 October 2003 06:27
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?
          Importance: High

          PROBLEM SOLVED!!!

           

          No idea why but I think the SET NOCOUNT command sent by Ryan seems to have worked??

           

          Can anyone tell me why this happened?

           

          Always at your service,

          Marc Trollip (Director)
          http://www.i-ballmedia.com
          http://www.blackwidow.co.za/

          "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

           

          "Every man dies. Not every man really lives" - William Wallace

           

          Disclaimer and confidentiality note

          Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

           

           

           

          -----Original Message-----
          From: Marc Trollip [mailto:webmaster@...]
          Sent: 30 October 2003 09:21 PM
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

           

          Yes I am – but using the recordset object so I can have the details after the SP has run returned to the asp page.

           

          Just sent the ASP code in my last post …

           

          Always at your service,

          Marc Trollip (Director)
          http://www.i-ballmedia.com
          http://www.blackwidow.co.za/

          "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

           

          "Every man dies. Not every man really lives" - William Wallace

           

          Disclaimer and confidentiality note

          Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

           

           

           

          -----Original Message-----
          From: Richard Rogers [mailto:rrogers@...]
          Sent: 30 October 2003 09:12 PM
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine-but ASP call fails?

           

          Are you executing the stored procedure via ASP (such as setMyRecordset = MyConnection.Execcute 'usp..')?

          -----Original Message-----
          From: Marc Trollip [mailto:webmaster@...]
          Sent: Thursday, October 30, 2003 1:08 PM
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

          Yes,

           

          At the bottom of the SP you will see that I assign the @@error code to a local variable @rc and return this along with my recordset.

           

          In query analyser I see the results and the recordset no problem - but my ASP page sees the recordset state as being closed (equal to zero) ??

           

          Always at your service,

          Marc Trollip (Director)
          http://www.i-ballmedia.com
          http://www.blackwidow.co.za/

          "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

           

          "Every man dies. Not every man really lives" - William Wallace

           

          Disclaimer and confidentiality note


          Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

           

           

           

          -----Original Message-----
          From: Richard Rogers [mailto:rrogers@...]
          Sent: 30 October 2003 08:54 PM
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: RE: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine- but ASP call fails?

           

          Are you returning the @@Error into a recordset?

          -----Original Message-----
          From: Marc Trollip [mailto:webmaster@...]
          Sent: Thursday, October 30, 2003 12:55 PM
          To: SQLQueriesNoCode@yahoogroups.com
          Subject: [SQLQueriesNoCode] SQL SP problem - Query Analyzer runs fine - but ASP call fails?
          Importance: High

          Hey Brains!

           

          I have an SQL SP which I have written to mirror a record coming in from a remote server to the local server. When I run the following in Query Analyzer - it produces a record/row no problem - but my ASP page sees the recordset as being closed?

           

          Any ideas?

           

          CREATE PROCEDURE usp_MirrorRegRecord

            @RegistrationID bigint,

            @RegFullName varchar(50),

            @RegEmail varchar(50),

            @RegAge int,

            @RegGender int,

            @RegPop int,

            @RegIncome int,

            @RegCountry int,

            @RegRegion bigint,

            @RegUserName varchar(50),

            @RegPassword varchar(50),

            @RegDate datetime,

            @RegIpAddress varchar(50),

            @RegOpSys int,

            @RegBrowser int,

            @RegFlash int,

            @RegScreenWidth int,

            @RegScreenDepth int,

            @RecordLocation as varchar(20)

          AS

            DECLARE @rc int

              SELECT @rc = 0

           

          BEGIN TRANSACTION AddRegistrationRecord

           

                INSERT INTO dbo.bt_Registrations (RegistrationID, RegFullName, RegEmail, RegAge, RegGender, RegPop, RegIncome, RegCountry,

                                            RegRegion, RegUserName, RegPassword, RegDate, RegIpAddress, RegOpSys, RegBrowser, RegFlash, RegScreenWidth, RegScreenDepth)

                VALUES (@RegistrationID, @RegFullName, @RegEmail, @RegAge, @RegGender, @RegPop, @RegIncome, @RegCountry,@RegRegion, @RegUserName,

                                @RegPassword, @RegDate, @RegIpAddress, @RegOpSys, @RegBrowser, @RegFlash, @RegScreenWidth, @RegScreenDepth)

                if (@@ERROR <> 0)                

                    BEGIN

                       ROLLBACK TRANSACTION AddRegistrationRecord

                       select @rc = @@Error

                       Goto OnExit  

                    END

            COMMIT TRANSACTION AddRegistrationRecord

            OnExit:

             -- Return a recordset to the application for final processing of the mailer. If there was an error mirroring the record

             -- The row will be empty except for the MirrorErrorCode column which will be a value greater than zero. Zero means the

             -- Mirror was sucessfully completed.

             IF (@rc <> 0)

               BEGIN

                  SELECT @RecordLocation = 'FAIL'

               END

               ELSE

               BEGIN

                 SET @RecordLocation = 'Mirror'

                 Select *, @rc AS MirrorErrorCode, @RecordLocation AS RecordLocation, @@SERVERNAME AS SqlServerName 

                 FROM dbo.bt_registrations WHERE RegEmail = @RegEmail 

               END

           

           

           

          Always at your service,

          Marc Trollip (Director)
          http://www.i-ballmedia.com
          http://www.blackwidow.co.za/

          "All that we see or seem is but a dream within a dream" - Edgar Alan Poe

           

          "Every man dies. Not every man really lives" - William Wallace

           

          Disclaimer and confidentiality note



          Everything in this e-mail and any attachments relating to the official business of i-Ball Media is proprietary to the company. It is confidential, legally privileged and protected by law. i-Ball Media does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of i-Ball Media. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. i-Ball Media can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

           

           

          .

           

           



          To unsubscribe from this group, send an email to:
          SQLQueriesNoCode-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

          NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. The contents of this e-mail are confidential. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Please virus check all attachments to prevent widespread contamination and corruption of files and operating systems!




          (Message over 64 KB, truncated)

        Your message has been successfully submitted and would be delivered to recipients shortly.