Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 "Object was open" DB Error

Author  Topic 

gpatriarca
Starting Member

3 Posts

Posted - 2004-10-21 : 16:33:54
I am working with a PowerBuilder 9 window which contains two datawindow objects and originally have embedded SQL. I transformed the two datawindow objects to use stored procs in MS SQL Server 2000. When I run the application to insert a new row, I got the ff. error message:

A database error has occurred.
Database error code: 999
Database error message:
Microsoft OLE DB Provider for SQL Server
Object was open.
No changes made to database.
execute dbo.p_inert_data;1

Please help how I can solve this problem. Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-10-21 : 16:45:08
Does the stored procedure work in Query Analyzer?

Tara
Go to Top of Page

gpatriarca
Starting Member

3 Posts

Posted - 2004-10-21 : 16:52:43
quote:
Originally posted by gpatriarca

I am working with a PowerBuilder 9 window which contains two datawindow objects and originally have embedded SQL. I transformed the two datawindow objects to use stored procs in MS SQL Server 2000. When I run the application to insert a new row, I got the ff. error message:

A database error has occurred.
Database error code: 999
Database error message:
Microsoft OLE DB Provider for SQL Server
Object was open.
No changes made to database.
execute dbo.p_inert_data;1

Please help how I can solve this problem. Thanks!

REPLY: Yes, the stored procs (two of them, one for each datawindow object) work in Query Analyzer.



Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-10-21 : 16:54:07
I'd suggest posting this on a PowerBuilder forum then.

Tara
Go to Top of Page

gpatriarca
Starting Member

3 Posts

Posted - 2004-10-21 : 16:56:54
Thanks Tara.
Go to Top of Page

pvedi
Starting Member

6 Posts

Posted - 2007-05-21 : 17:13:03
Make sure that the Declare <localPRocName> for PROCEDURE USING SQLCA... is not first line in the code, if it is the first line then before this line decalare a local dummy variable.
I think PB takes the first semicolon of the declaration and thinks there is an ancestor script and try to execute Declare line as ancestor call...
Go to Top of Page
   

- Advertisement -