Click here to Skip to main content
15,892,072 members
Home / Discussions / Database
   

Database

 
GeneralRe: Classic ASP and MS SQL Express Edition Pin
Dave Kreskowiak13-Jul-07 8:55
mveDave Kreskowiak13-Jul-07 8:55 
GeneralRe: Classic ASP and MS SQL Express Edition Pin
Fayu16-Jul-07 12:50
Fayu16-Jul-07 12:50 
AnswerDO NOT CROSSPOST Pin
leckey13-Jul-07 7:05
leckey13-Jul-07 7:05 
GeneralRe: DO NOT CROSSPOST Pin
Paul Conrad13-Jul-07 11:46
professionalPaul Conrad13-Jul-07 11:46 
GeneralRe: DO NOT CROSSPOST Pin
Sathesh Sakthivel13-Jul-07 16:21
Sathesh Sakthivel13-Jul-07 16:21 
QuestionHow to create hash clustered index in oracle? Pin
Mushtaque Nizamani12-Jul-07 23:53
Mushtaque Nizamani12-Jul-07 23:53 
AnswerRe: How to create hash clustered index in oracle? Pin
Paul Conrad13-Jul-07 11:49
professionalPaul Conrad13-Jul-07 11:49 
Questionsqlerror Pin
saravanan0512-Jul-07 23:13
saravanan0512-Jul-07 23:13 
hi friends

this is my stored procedure:

CREATE procedure dbo.sp_ins_logo
@companyname varchar(120),
@country varchar(80),

@url varchar(150),
@category varchar(80),
@description varchar(250),
@picturepath varchar(80),
@picturetype char(5),
@status int,


@ins_status varchar(10) output,
@lcode varchar(10) output
as
set nocount on
begin transaction

declare @logo_rowid decimal
declare @logo_code varchar(10)


declare @logo_rowcount decimal


declare @max_logoid decimal

declare @logo_codepfix char(3)


set @logo_codepfix='LGO'

select @logo_rowcount= (select count(*) from dbo.tbladdlogos1)


if @logo_rowcount = 0
begin
select @logo_rowid = 1
select @logo_code = @logo_codepfix + convert(varchar(5),@logo_rowid)

end
else
begin
select @max_logoid = (select max(row_id) from dbo.tbladdlogos1)
set @logo_rowid = @max_logoid + 1
set @logo_code = @logo_codepfix + convert(varchar(5),@logo_rowid)
end


declare @file_name varchar(80)
set @file_name = @picturepath + @logo_code + '.' + @picturetype

if not exists (select companyname from dbo.tbladdlogos1 where url = @url)
begin
if not exists (select companyname from dbo.tbladdlogos1 where companyname = @companyname)
begin
insert into dbo.tbladdlogos1 values(@logo_rowid,@logo_code,@companyname,@country,@url,@category,@description,@file_name,@status)


declare @ER as int
select @ER = @@error
if @ER <> 0
begin
set @ins_status='Failure'
set @lcode=@logo_code
end
else
begin
set @ins_status='Success'
set @lcode=@logo_code
end
end
end

commit
GO


this is my table

CREATE TABLE [tbladdlogos1] (
[row_id] [int] NOT NULL ,
[logo_code] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[companyname ] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[url] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[category] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[picturepath] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[status] [int] NULL
) ON [PRIMARY]
GO



i inserted value

below error is occured

Invalid object name 'dbo.tbladdlogos1'. Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.


can u help me

regards
saravanan
AnswerRe: sqlerror Pin
Mike Dimmick12-Jul-07 23:45
Mike Dimmick12-Jul-07 23:45 
GeneralRe: sqlerror Pin
TomGarth15-Jul-07 9:16
TomGarth15-Jul-07 9:16 
QuestionReferring .RDL file Pin
Karuna Kumar12-Jul-07 21:28
Karuna Kumar12-Jul-07 21:28 
AnswerRe: Referring .RDL file Pin
Paul Conrad13-Jul-07 12:57
professionalPaul Conrad13-Jul-07 12:57 
GeneralRe: Referring .RDL file Pin
Karuna Kumar15-Jul-07 21:17
Karuna Kumar15-Jul-07 21:17 
QuestionCreating a new Folder Pin
Karuna Kumar12-Jul-07 21:23
Karuna Kumar12-Jul-07 21:23 
AnswerRe: Creating a new Folder Pin
Frank Kerrigan16-Jul-07 2:30
Frank Kerrigan16-Jul-07 2:30 
QuestionViews with Insert Query Pin
Suryanairg12-Jul-07 18:06
Suryanairg12-Jul-07 18:06 
AnswerRe: Views with Insert Query Pin
Krish - KP12-Jul-07 18:52
Krish - KP12-Jul-07 18:52 
Questionassigning value to variable in stored procedure Pin
brsecu12-Jul-07 7:59
brsecu12-Jul-07 7:59 
AnswerRe: assigning value to variable in stored procedure Pin
Pete O'Hanlon12-Jul-07 8:24
mvePete O'Hanlon12-Jul-07 8:24 
GeneralRe: assigning value to variable in stored procedure Pin
brsecu13-Jul-07 4:32
brsecu13-Jul-07 4:32 
GeneralRe: assigning value to variable in stored procedure Pin
Pete O'Hanlon13-Jul-07 4:52
mvePete O'Hanlon13-Jul-07 4:52 
AnswerRe: assigning value to variable in stored procedure Pin
RepliCrux12-Jul-07 19:05
RepliCrux12-Jul-07 19:05 
GeneralRe: assigning value to variable in stored procedure Pin
brsecu13-Jul-07 4:32
brsecu13-Jul-07 4:32 
QuestionHelp regarding moving records Pin
anu8112-Jul-07 3:31
anu8112-Jul-07 3:31 
AnswerRe: Help regarding moving records Pin
Pete O'Hanlon12-Jul-07 4:04
mvePete O'Hanlon12-Jul-07 4:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.