Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 24th, 2004, 08:20 AM
Authorized User
Join Date: Jun 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default Stored Procedure Error in MS Access

hi all,

The following code works properly on SQL-server. I tried to modify the code so that I can run it using MS Access. However, I have got Create procedure error. Is it possible to create procedure in MS Access? which line do I need to delete so that the code would work in MS Access?
Thank you

@userName Text,
@password Text,
@sessionkey Number Output,
@expiration DateTime Output,
@userID Number Output,
@role Number Output )

@userID = userID,
@role = role
From webserviceUsers
where userName = @userName
AND password = @password

    SET @sessionkey = NEWID()
    SET @expiration = DateAdd(mi, 30, GetDate() )
    INSERT INTO sessionKeys (session_key,
            session_expiration,session_userID, session-userName,
    VALUES (@sessionkey, @expiration, @userID, @userName, @role )
return -1;

Old June 24th, 2004, 08:38 AM
Friend of Wrox
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

You cannot create Stored procedures in MS-Access.

Om Prakash
Old June 24th, 2004, 02:05 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts

If you are trying to use this proc in an Access Data Project (.adp file), you need to use the SQL Server data types, not the Access/Jet data types you have listed. If you are trying to use it in an Access .mdb file (Jet engine based) app, Om is correct, you can't.


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO: create stored procedure in Ms access Kaustav Access 5 December 19th, 2014 01:14 PM
The MS HowToDemo Stored Procedure TomW VB Databases Basics 10 March 5th, 2008 11:38 AM
Passing Variable MS Proj to SQL Stored Procedure Abaxt Access VBA 2 July 7th, 2005 11:05 AM
output parameter from MS SQL stored procedure nav1 VB How-To 0 March 14th, 2005 05:00 PM
MS SQL Stored procedure and VBA jesseleon Pro VB Databases 0 July 30th, 2004 01:16 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.