Wednesday, March 7, 2012

Could not find stored procedure

Hi all,
"I bag your pardon" but i don?t speak english wery well!
I?m in Brazil.
I have a trouble like this:
My application was made in Delphi 5.0/MS-SQL 6.5 using BDE to connect - it
was perfect;
Now my application use MS-SQL 2000, and if i try to run a Stored Procedure
with some "param" I get the error message: "Could not find stored
procedure: <storedprocname>";
NOTES:
1) At the Interprise manager, I run the stored procedure with sucess;
2) At the application I can see the stored procedure, but I cant run it;
3) At the Borland SQL Explorer I can run the stored procedure;
4) At the application I can rum any stored procedure without "params";
5) I have under 700 stored procedure with "param";
6) I saw users of: ASP.NET, ADO.NET and PowerBuilder with the same trouble;
7) The application also was compiled at Delphi 6 and the trouble
continue...;
8) I do a test database with new Table and new Stored Procedures and the
trouble continue...
Some one can help me?
Thanks,
Giovanny Carvalho
--
Message posted via http://www.sqlmonster.comHi,
Can you login to Query Analyzer using the same user name and password you
are using from application. See the database that
login is defaulted to. If the database is Master then use the system
procedure SP_DEFAULTDB (see books online) to change the default db for the
login.After
that try login again and execute the procedures with parameter.
Looks like you are in master database and executing procedure.
Thanks
Hari
SQL Server MVP
"Giovanny Carvalho via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote
in message news:bb722f360cfb4d28b59b5bdfb6c0b728@.SQLMonster.com...
> Hi all,
> "I bag your pardon" but i don?t speak english wery well!
> I?m in Brazil.
> I have a trouble like this:
> My application was made in Delphi 5.0/MS-SQL 6.5 using BDE to connect -
> itSee
> was perfect;
> Now my application use MS-SQL 2000, and if i try to run a Stored Procedure
> with some "param" I get the error message: "Could not find stored
> procedure: <storedprocname>";
> NOTES:
> 1) At the Interprise manager, I run the stored procedure with sucess;
> 2) At the application I can see the stored procedure, but I cant run it;
> 3) At the Borland SQL Explorer I can run the stored procedure;
> 4) At the application I can rum any stored procedure without "params";
> 5) I have under 700 stored procedure with "param";
> 6) I saw users of: ASP.NET, ADO.NET and PowerBuilder with the same
> trouble;
> 7) The application also was compiled at Delphi 6 and the trouble
> continue...;
> 8) I do a test database with new Table and new Stored Procedures and the
> trouble continue...
> Some one can help me?
> Thanks,
> Giovanny Carvalho
> --
> Message posted via http://www.sqlmonster.com|||"Giovanny Carvalho via SQLMonster.com" <forum@.nospam.SQLMonster.com> schrieb
im Newsbeitrag news:bb722f360cfb4d28b59b5bdfb6c0b728@.SQLMonster.com...
> Hi all,
> "I bag your pardon" but i don?t speak english wery well!
> I?m in Brazil.
> I have a trouble like this:
> My application was made in Delphi 5.0/MS-SQL 6.5 using BDE to connect - it
> was perfect;
> Now my application use MS-SQL 2000, and if i try to run a Stored Procedure
> with some "param" I get the error message: "Could not find stored
> procedure: <storedprocname>";
> NOTES:
> 1) At the Interprise manager, I run the stored procedure with sucess;
> 2) At the application I can see the stored procedure, but I cant run it;
> 3) At the Borland SQL Explorer I can run the stored procedure;
> 4) At the application I can rum any stored procedure without "params";
> 5) I have under 700 stored procedure with "param";
> 6) I saw users of: ASP.NET, ADO.NET and PowerBuilder with the same
> trouble;
> 7) The application also was compiled at Delphi 6 and the trouble
> continue...;
> 8) I do a test database with new Table and new Stored Procedures and the
> trouble continue...
> Some one can help me?
> Thanks,
> Giovanny Carvalho
> --
> Message posted via http://www.sqlmonster.com|||Must be a problem with owner of the procedure, as long as we don´t know how
you call your Procedure, we don´t know how use prefix it. Running under
another account than the owner of the procedure could cause problems.
--connected as sa
Create Procedure Jens.SP_Whatever
AS
Select 1
EXEC SP_Whatever --Will produce an Error
EXEC Jens.SP_Whatever --Will work fine.
HTH, Jens Süßmeyer.
"Giovanny Carvalho via SQLMonster.com" <forum@.nospam.SQLMonster.com> schrieb
im Newsbeitrag news:bb722f360cfb4d28b59b5bdfb6c0b728@.SQLMonster.com...
> Hi all,
> "I bag your pardon" but i don?t speak english wery well!
> I?m in Brazil.
> I have a trouble like this:
> My application was made in Delphi 5.0/MS-SQL 6.5 using BDE to connect - it
> was perfect;
> Now my application use MS-SQL 2000, and if i try to run a Stored Procedure
> with some "param" I get the error message: "Could not find stored
> procedure: <storedprocname>";
> NOTES:
> 1) At the Interprise manager, I run the stored procedure with sucess;
> 2) At the application I can see the stored procedure, but I cant run it;
> 3) At the Borland SQL Explorer I can run the stored procedure;
> 4) At the application I can rum any stored procedure without "params";
> 5) I have under 700 stored procedure with "param";
> 6) I saw users of: ASP.NET, ADO.NET and PowerBuilder with the same
> trouble;
> 7) The application also was compiled at Delphi 6 and the trouble
> continue...;
> 8) I do a test database with new Table and new Stored Procedures and the
> trouble continue...
> Some one can help me?
> Thanks,
> Giovanny Carvalho
> --
> Message posted via http://www.sqlmonster.com|||I also think that the trouble is related with Owner;
Lets go:
The Owner is: DBO
The user in the Delphi is (to tests): sa
At this exemple, I have the trouble.
CREATE PROCEDURE SP_Mostra_ADItem
@.NumeroAD char(10)
AS
SELECT *
FROM MaterialADItem
WHERE RTRIM(NumeroADItem) = RTRIM(@.NumeroAD)
At this exemple, I don't have the trouble.
CREATE PROCEDURE SP_Mostra_ADItem
AS
SELECT *
FROM MaterialADItem
<<<<>>
At the delphi, in the Component TStoredProc, I set:
StoredProcName = 'dbo.SP_Mostra_ADItem;1'
I will Try your "Tips"!!!
Thanks
Giovanny Carvalho
--
Message posted via http://www.sqlmonster.com|||Generally DBO should own all objects in the database.
All references to a table, sp, view, udf should use the 2-part name
exec dbo.myproc
select title, price from dbo.titles
this will help avoid the missing object problem you have encountered.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Giovanny Carvalho via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote
in message news:bb722f360cfb4d28b59b5bdfb6c0b728@.SQLMonster.com...
> Hi all,
> "I bag your pardon" but i don?t speak english wery well!
> I?m in Brazil.
> I have a trouble like this:
> My application was made in Delphi 5.0/MS-SQL 6.5 using BDE to connect - it
> was perfect;
> Now my application use MS-SQL 2000, and if i try to run a Stored Procedure
> with some "param" I get the error message: "Could not find stored
> procedure: <storedprocname>";
> NOTES:
> 1) At the Interprise manager, I run the stored procedure with sucess;
> 2) At the application I can see the stored procedure, but I cant run it;
> 3) At the Borland SQL Explorer I can run the stored procedure;
> 4) At the application I can rum any stored procedure without "params";
> 5) I have under 700 stored procedure with "param";
> 6) I saw users of: ASP.NET, ADO.NET and PowerBuilder with the same
trouble;
> 7) The application also was compiled at Delphi 6 and the trouble
> continue...;
> 8) I do a test database with new Table and new Stored Procedures and the
> trouble continue...
> Some one can help me?
> Thanks,
> Giovanny Carvalho
> --
> Message posted via http://www.sqlmonster.com

No comments:

Post a Comment