473,602 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem running stored procedure

2 New Member
hi,

I want to use a stored procedure inside a stored procedure simulteanously changing the database.
this is my base store procedure

alter PROCEDURE create_file @dbname sysname
AS
declare @fname varchar(30)
declare @fsizes nvarchar
BEGIN
DECLARE @cmd varchar(1000)
set @cmd = 'osql -E -d ' + @dbname + ' -Q "exec ret_sizes @fname OUTPUT,@fsizes OUTPUT"'
exec master..xp_cmds hell @cmd
END


if i execute the his "exec create_file ertis"
i get error as

Msg 137, Level 15, State 2, Server HCC-BPVHD1, Line 1
Must declare the variable '@fname'.
NULL


the procedure called inside the mail procedure is

alter procedure ret_sizes
@fname varchar(30) OUTPUT,
@fsizes nvarchar OUTPUT
as
begin
select @fname=name, @fsizes=size from sysfiles
order by fileid
end


Please help me and not why it is getting eror.
Sep 16 '06 #1
0 1625

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2752
by: Steve Thorpe | last post by:
Hi I am trying to write a report that calculates the average number of sales over 7, 14, 31 and 365 days for each hourly period of the day. the problem is it takes over 4 minutes to run. e.g. Average Xactions per Hour 7 Days 14 Days 31 Days 365 Days 00:00 - 01:00 1,141.6 579.2 261.6 28.8
1
3703
by: Steve Thorpe | last post by:
Hi I am trying to write a report that calculates the average number of sales over 7, 14, 31 and 365 days for each hourly period of the day. the problem is it takes over 4 minutes to run. e.g. Average Xactions per Hour 7 Days 14 Days 31 Days 365 Days 00:00 - 01:00 1,141.6 579.2 261.6 28.8
8
1511
by: Jim R | last post by:
The following is a create that I was trying to run in SQL/2000 SQL Analyser: CREATE TABLE tblxyz as (Select * from tblPlayers); tblPlayers has 2 rows in it. I continue to get the error Server: Msg 156, Level 15, State 1, Line 1
4
4383
by: Nyul | last post by:
Gurus, I have a verb big problem which I'm unable to explain. We have a DB2 V6.1.0 on AIX 4.3 I want to make a C stored procedure which at the end will be called by a PHP script. The development server was an UDB V6.1.0 on W2K. Everything went well. I was able to call the stored proc from C and from Delphi.
2
4272
by: Rhino | last post by:
I am getting an sqlcode of -927 when I execute SQL within a COBOL stored procedure in DB2 OS/390 Version 6 on OS/390. I have looked at the error message for that condition and tried everything I could think of to resolve the problem but nothing works. The stored proc is running in the DB2 Stored Procedures Address Space and both the client and the proc have DSNELI linked into their load modules. The client and proc are running in TSO via...
5
3654
by: Timppa | last post by:
Hi, Could anyone help me with my problem ? Environment: Access 2000 and Sql Server 2000. I have a stored procedure as follows: DROP table1 SELECT alias1.field1,alias2.field2,table2.field6 INTO table1
2
2425
by: Robert E. Flaherty | last post by:
I am using System.Data.OracleClient (Oracle Provider for OLE DB 9.2.0.4.0) in an ASP.NET 1.1 app. I am evoking a stored procedure with a number of input parameters and two output parameters, both declared ParametrerDirection.InputOutput. The first of these two output parameters is an integer value. It is the status of the running of the stored procedure. It is working fine. The second parameter is designed to return a message from...
8
1924
by: billmiami2 | last post by:
I'm experiencing a strange problem that I believe is related to ADO.NET but I can't say for sure. I have a simple ASP.NET reporting interface to a SQL Server 2000 database. One report that we run returns a listing of community members and their contact information using a stored procedure. Depending on the selected community, this can return from a hundred to over 1000 rows. Occasionally, the report stops running when a community with...
4
3979
by: nishi57 | last post by:
I hope I can get some help regarding this issue, which has been going on for a while. I have a desktop user who is having problem running "Stored Procedures". The DB2 Connect application works fine but when he runs the stored procedure, he gets the following error message. "SYSPROC".CSGCSB54 - Run started. Data returned in result sets is limited to the first 100 rows. Data returned in result set columns is limited to the first 20...
3
1866
by: laststubborn | last post by:
Dear Memebers, I have a critical problem. I have an application is running on 64 bit machine. It used to be running on 32 bit machine. That application is using a Stored Procedure that uses SELECT, INSERT, UPDATE statements. Whenever this applicataion is being run all the processes are locked and INSERTING operation becomes cumbersome. We tested again on 32 bit machine however it happened again. So what might be the problem? Can...
0
7920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.