Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Error executing SQL store precedure
Last Post 05-06-2012 06:22 PM by Stephan Bourgeois. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Stephan BourgeoisUser is Offline
going with the flow
going with the flow
Posts:31
Avatar

--
05-02-2012 02:14 AM
    Hi,

    Everytime the store procedure is executed, I am getting  an email containing the following error:
    ====================================================

    SQL Event Error:Abonnement d'essaie 15 jours

    .An error occurred when attempting to run this SQL query:


    sp_AddExpireDateNewOrExisting 2, 699, 15

    The error returned isbject reference not set to an instance of an object.

    ==================================================

    Looks like a variable is not initialised.

    Any clue what could be the problem?

    Belllow is the source code of the store procedure.


    Thanks


    Store procedure
    =============================================================

    USE [apsqadmin]

    GO

    /****** Object:  StoredProcedure [dbo].[sp_AddExpireDateNewOrExisting]    Script Date: 05/02/2012 07:01:54 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO


    ALTER Procedure [dbo].[sp_AddExpireDateNewOrExisting] 

    @RoleID int, 

    @UserID int, 

    @Days int

    AS

    BEGIN

    IF @Days > 0

    BEGIN


    -- if UserID doesn't belong to RoleID, then add to the table and set expiration date

     if (select count(*) from DNN_UserRoles where UserID=@UserID and RoleID=@RoleID) = 0

      BEGIN

    -- if trial period (désire payer par la poste)

    IF @DAYS = 15

    BEGIN

    insert into DNN_UserRoles(UserID,RoleID,ExpiryDate,IsTrialUsed,EffectiveDate)

    values (@UserID,@RoleID,DATEADD(Day,@Days, getdate()),0,getdate()) 

    END

    ELSE

    -- Si nouveau membre actif (Paypal)

    BEGIN

    DECLARE @date_time AS varchar(30)

    SET @date_time = CONVERT(varchar,Year(getdate())) + '/04/01'; -- abonnement valide jusqu'au 1 avril de l'année suivante



    insert into DNN_UserRoles(UserID,RoleID,ExpiryDate,IsTrialUsed,EffectiveDate)

    values (@UserID,@RoleID,DATEADD(Year,1, @date_time),0,getdate()) 

    END

      END 

     -- If UserID belongs to RoleID and ExpiryDate not expired (set ExpiryDate to 1 avril de l'année suivante)

     else if ((select ExpiryDate from DNN_UserRoles where UserID=@UserID and RoleID=@RoleID) > getdate()) 

      BEGIN

    DECLARE @renewal_year_date AS datetime

    SET @renewal_year_date = (SELECT ExpiryDate from DNN_UserRoles where UserID=@UserID and RoleID=@RoleID)

    SELECT @renewal_year_date

    SET @date_time = CONVERT(varchar,Year(@renewal_year_date)) + '/04/01'; -- abonnement valide jusqu'au 1 avril de l'année suivante

        update DNN_UserRoles set ExpiryDate = DATEADD(Year,1, @date_time) where UserID=@UserID and RoleID=@RoleID

      END

     else

     -- If UserID belongs to RoleID and ExpiryDate already expired (set ExpiryDate 1 avril de l'année suivante)

      BEGIN

    SET @date_time = CONVERT(varchar,Year(getdate())) + '/04/01'; -- abonnement valide jusqu'au 1 avril de l'année suivante

        update DNN_UserRoles set ExpiryDate =  DATEADD(Year,1, @date_time) where UserID=@UserID and RoleID=@RoleID

    END

    END

    END


    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    05-02-2012 11:16 AM
    Hi... What happens if you run this under Host/SQL?

    Make you need to add "EXEC" in front of the stored procedure?

    Thanks,

    Chad
    Stephan BourgeoisUser is Offline
    going with the flow
    going with the flow
    Posts:31
    Avatar

    --
    05-06-2012 06:22 PM
    Same error with the EXEC in front of the sp.

    No error in SQL with Host.
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi