how can i convert this code for sql 2000 server

Posted on 2008-10-16
Last Modified: 2012-05-05
hey how can i convert this code into sql server 2000 please help
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[veryfypassword]
@C_UserName varchar(50),
@C_Pass varchar(50)
	@parameter1 int = 5,
	@parameter2 datatype OUTPUT
declare @ID varchar(100)
select @ID= C_UserName
from CustTable
where C_UserName = @C_UserName
and C_Pass=@C_Pass
if @ID is not null
return 0
if exists(select C_UserName from CustTable where C_UserName=@C_UserName)
return 2

Open in new window

Question by:devilsuraj
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 250 total points
ID: 22729843
there is no conversion needed, at least as far as I can see.

Author Comment

ID: 22729992
but it throws error that object not found custtable
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22730075
if that table does not exist, that error is normal (in sql 2000)

Assisted Solution

tiagosalgado earned 250 total points
ID: 22730089
1. Do you have any CustTable on your database?
2. Are you running that code in the right DataBase?

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question