Stored Procedure with OLEDB

Results 1 to 2 of 2

Thread: Stored Procedure with OLEDB

  1. #1
    Join Date
    Dec 1969

    Default Stored Procedure with OLEDB

    I have problem of using OLEDB for calling any stored procedure which has any update or insert statement and then return with select statement, but with the same stored procedure using DSN then it&#039s okay. This is the error that I got on my asp.<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for SQL Server (0x80040E0C)<BR>Command text was not set for the command object.<BR><BR>Here is my stored procedure. If I comment it out the update statement then everything is fine.<BR><BR>Thanks for any help.<BR><BR><BR><BR>create procedure dbo.chkLoginPassword ( @pUserid char(20), @pPassword char(20) )<BR>as <BR>begin<BR> declare @xxx char(20), @rand char(30), @userid char(20), @cid int<BR> <BR> if exists ( select userid from users<BR> where userid = @pUserid<BR> and password = @pPassword )<BR> begin<BR> <BR> <BR> select @xxx = convert(char(20), getdate(), 14)<BR> select @rand = substring(convert( char(30), rand(), 2),3,12) + substring(@xxx, 4,2) + substring(@xxx, 7,2) + substring(@xxx, 10,3) + substring(convert( char(30), rand(), 2),3,12)<BR><BR> update Users<BR> set EncryptUserid = @rand,<BR> LastLoginTime = getdate()<BR> where userid = @pUserid<BR> and password = @pPassword <BR> <BR> select @rand<BR> <BR> end <BR> else <BR> begin<BR> select -1<BR> end <BR><BR>end

  2. #2
    Join Date
    Dec 1969

    Default RE: Stored Procedure with OLEDB

    What does your ASP Code look like?<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts