Showing posts with label returned. Show all posts
Showing posts with label returned. Show all posts

Thursday, March 29, 2012

error: Cursor not returned from query

I'm a really beginner about sql2000.
During my test I have created the following query. It's works ok until I
do't add the code included in section A, when I add it the i obtain the
error: Cursor not returned from query

Anyone can help me?

Thanks Carlo M.

set nocount on

IF OBJECT_ID('storico_big') IS NULL -- section A begin
create table storico_big( data datetime,
bcarrier varchar(20),
bda CHAR(30),
bzone char(50),
bdur int) ;
insert into storico_big -- section A
end

select top 10000
adetdate,bcarrier,bda,bzone,bdur
from pp_cdr (nolock)
where
adetdate < :data_fin and adetdate > :data_in order by adetdate
set nocount off

-- end of queryIW2FIV (carlo.merlini[NONROMPERE]@.libero.it) writes:
> I'm a really beginner about sql2000.
> During my test I have created the following query. It's works ok until I
> do't add the code included in section A, when I add it the i obtain the
> error: Cursor not returned from query

Apparently you are using some environment unknown to me. At least I
don't recognize the message.

> IF OBJECT_ID('storico_big') IS NULL -- section A begin
> create table storico_big( data datetime,
> bcarrier varchar(20),
> bda CHAR(30),
> bzone char(50),
> bdur int) ;
> insert into storico_big -- section A
> end

Since there are several apparent syntax errors here, it would have been nice
if you environment had returned the errors from SQL Server, rather than
bitching about the missing cursor.

It can be a good to run the query from Query Analyzer to get better
error diagnostics.

I don't really want to suggest a correction, because I can't understand
what you are trying to do. It appears that in the same batch that you first
want to create a table, insert into it, and then select data from another
table.

Possibly you want to insert the data from the SELECT statement into
storico_big, but in such case you should

1) get rid of that extraneous end
2) add an explicit column list to the INSERT statement.

However, I have a feeling that if you insert data into the table, the
client environment will still complain about a missing cursor...

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:
> IW2FIV (carlo.merlini[NONROMPERE]@.libero.it) writes:
> > I'm a really beginner about sql2000.
> > During my test I have created the following query. It's works ok until I
> > do't add the code included in section A, when I add it the i obtain the
> > error: Cursor not returned from query
> Apparently you are using some environment unknown to me. At least I
> don't recognize the message.
I would suspect that it's some data layer (such as ADO, ADO.NET, DAO,
etc), which has at least two different methods of performing work in
the database - one for performing data retrieval and another (possibly
on another object, if the layer is object oriented) which allows data
manipulation.

For instance, ADO.NET has ExecuteReader and ExecuteNonQuery methods on
it's command object.

Damien|||Damien (Damien_The_Unbeliever@.hotmail.com) writes:
> I would suspect that it's some data layer (such as ADO, ADO.NET, DAO,
> etc), which has at least two different methods of performing work in
> the database - one for performing data retrieval and another (possibly
> on another object, if the layer is object oriented) which allows data
> manipulation.
> For instance, ADO.NET has ExecuteReader and ExecuteNonQuery methods on
> it's command object.

Obviously IWZFIV is not using ADO .Net. ADO .Net does work with cursors
at all, as far as a I know. A more substantial clue is the condition:

adetdate < :data_fin and adetdate > :data_in order by adetdate

Apparently IWZFIV is using some form of embedded SQL.

Anyway, I would not really describe ADO .Net as providing different methods
for different purposes. If all you want is minimalism, you can do every-
thing with ExecuteReader. The other methods, ExecuteNonQuery, ExecuteScalar
and DataAdapter.Fill can be seen as convenience methods implemented on
top of ExecuteReader. (OK, this is not really true. There are some
fine differences when there are multiple error messages and result sets
interleaved.)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Sunday, March 11, 2012

Error: 'SubQuery Returned More than 1 Value'

I have some code that calls a stored procedure on SQL Server 2005 using the Microsoft JDBC driver 1.1. The code normally works however, every once in a while an exception is thrown:

Code Snippet

com.microsoft.sqlserver.jdbc.SQLServerException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !, <,<=, >, >=, or when the subquery is used as an expression.

Generally, this has been resolved by restarting SQL Server 2005, but why is it showing up to being with?

Stored Procedure:

Code Snippet

ALTER Procedure [dbo].[addRecord]
@.userID int,
@.itemID int,
@.info varchar(50),
@.comment varchar(50),
@.output int output
AS

Declare @.dateSubmitted datetime
set @.dateSubmitted = getDate();

--Insert the new record. THIS TABLE has an ID identity Primary Key
--column that auto-increments.
insert into RecordTable
(UserPerson, Information, DateSubmitted)
values (@.userID, @.info, @.dateSubmitted);

Get the ID Assigned in the record table. The Item table
has a Foreign key on this column.
Declare @.assignedID int
set @.assignedID = (select ID from RecordTable where DateSubmitted = @.dateSubmitted)

/**Set the output parameter.*/
set @.output = @.assignedID;

--Now update the Item Table.
insert into Item
(ID, RecordID, Comment)
values (@.item,@.assignedID, @.comment);

set @.assignedID = (select ID from RecordTable where DateSubmitted = @.dateSubmitted)

my guess is that you get that error because you insert more than one record with the same datesubmitted value.

|||

CharlieXXX wrote:

set @.assignedID = (select ID from RecordTable where DateSubmitted = @.dateSubmitted)

my guess is that you get that error because you insert more than one record with the same datesubmitted value.

That's not possible. The error occurs even when the RecordTable is empty.
|||

SomeDeveloperPerson wrote:

CharlieXXX wrote:

set @.assignedID = (select ID from RecordTable where DateSubmitted = @.dateSubmitted)

my guess is that you get that error because you insert more than one record with the same datesubmitted value.

That's not possible. The error occurs even when the RecordTable is empty.

Charlie... you're actually correct. I modified the line to:

Code Snippet

set @.assignedID = (select MAX(ID) from RecordTable where DateSubmitted = @.dateSubmitted)

And it works with no problems now. Apparently the code is executing faster than expected so that several records are being written in under a millisecond.
|||

You can reduce the 'effort' of the procedure with this simple alteration:

Instead of having another query to obtain the IDENTITY value of the just entered row, use the SCOPE_IDENTITY() function.

Code Snippet


--Insert the new record. THIS TABLE has an ID identity Primary Key
--column that auto-increments.
insert into RecordTable
(UserPerson, Information, DateSubmitted)
values (@.userID, @.info, @.dateSubmitted);

Declare @.assignedID int
set @.assignedID = SCOPE_IDENTITY()

It saves a small amount of unnecessary server 'work' since the SCOPE_IDENTITY() is part of the return information from the original insert.

And using MAX() in the fashion that you are could potentially have you obtaining the value from a row inserted by another user. Not a very reliable prospect.

ERROR: "Subquery returned more than 1 value."

I've got a big procedure written by a contractor. I'm trying to
execute it (against a test db until I get it worked out) and there is
one section of it that fails. I've isolated the section and run it in
Query Analyzer and it still fails. Here is the SQL:
DELETE FROM tblBedOccupancy WHERE (
ContactID IN (
SELECT ContactID FROM tblPeople WHERE Community IN (
SELECT DISTINCT BuildingID FROM lnkCompaniesBuildings WHERE CompanyID
<> 61
)
)
)
The error returned is:
Server: Msg 512, Level 16, State 1, Procedure tg_DeleteOccupancyRecord,
Line 18
Subquery returned more than 1 value. This is not permitted when the
subquery follows =, !=, <, <= , >, >= or when the subquery is used as
an expression.
The statement has been terminated.
If I change DELETE to SELECT *, it runs fine. If I run the subqueries
they run fine. How can I get this to work?
Thanks,
Josh D> The error returned is:
> Server: Msg 512, Level 16, State 1, Procedure tg_DeleteOccupancyRecord,
> Line 18
> Subquery returned more than 1 value. This is not permitted when the
> subquery follows =, !=, <, <= , >, >= or when the subquery is used as
> an expression.
> The statement has been terminated.
Look closely at the error message. Did you notice the name
"tg_DeleteOccupancyRecord". What does this refer to? Looks like a
trigger - and a poorly written one to boot. The problem is the code in the
trigger.|||I'd agree with Scott, sounds like you have trigger written by someone who
didn't realize that triggers fire once per statement, not once per row.

> Server: Msg 512, Level 16, State 1, Procedure tg_DeleteOccupancyRecord,
> Line 18
> Subquery returned more than 1 value. This is not permitted when the
> subquery follows =, !=, <, <= , >, >= or when the subquery is used as
> an expression.
> The statement has been terminated.|||> I'd agree with Scott, sounds like you have trigger written by someone who
> didn't realize that triggers fire once per statement, not once per row.
...and if that was the contractor, this might constitute breach of contract
.
:)
ML|||> ...and if that was the contractor, this might constitute breach of
> contract.
> :)
Well, if the contractor's side of the agreement doesn't explicitly state, "I
know what I'm doing"...|||> Well, if the contractor's side of the agreement doesn't explicitly state, "Id">
> know what I'm doing"...
In continental law the "I know what I'm doing" part is presumed (praesumptio
iuris), and the contractor can only limit his own liability by stating the
opposite.
ML

Error: "expression can only refer to field w/ data scope"

I get the following error when i try to add a new field being returned in a
dataset:
"Report item expressions can only refer to fields within the current data
set scope or, if inside an aggregate, the specified data set scope".
I have no idea what this means, and i can reference just fine every other
field i'm returning in the dataset.
I found an earlier person who had this problem, and the response was "you
can only bind one dataset to a report item". This can't be my problem,
though, as i've only GOT one dataset.
TIA,
--
BrianSide note (may not be the solution to your problem):
You can bind more than one dataset to a report! I've done this
successfully, and it's actually pretty easy.
"G" <brian.grant@.si-intl-kc.com> wrote in message
news:#jeQ0rwfEHA.3148@.TK2MSFTNGP10.phx.gbl...
> I get the following error when i try to add a new field being returned in
a
> dataset:
> "Report item expressions can only refer to fields within the current data
> set scope or, if inside an aggregate, the specified data set scope".
> I have no idea what this means, and i can reference just fine every other
> field i'm returning in the dataset.
> I found an earlier person who had this problem, and the response was "you
> can only bind one dataset to a report item". This can't be my problem,
> though, as i've only GOT one dataset.
> TIA,
> --
> Brian
>|||Both comments below are true: You can have several datasets in a **report**
but only bind one dataset to a **report item**.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"SQL" <nospam@.adfadfadf.com> wrote in message
news:ufCl4HxfEHA.2812@.tk2msftngp13.phx.gbl...
> Side note (may not be the solution to your problem):
> You can bind more than one dataset to a report! I've done this
> successfully, and it's actually pretty easy.
>
> "G" <brian.grant@.si-intl-kc.com> wrote in message
> news:#jeQ0rwfEHA.3148@.TK2MSFTNGP10.phx.gbl...
> > I get the following error when i try to add a new field being returned
in
> a
> > dataset:
> >
> > "Report item expressions can only refer to fields within the current
data
> > set scope or, if inside an aggregate, the specified data set scope".
> >
> > I have no idea what this means, and i can reference just fine every
other
> > field i'm returning in the dataset.
> >
> > I found an earlier person who had this problem, and the response was
"you
> > can only bind one dataset to a report item". This can't be my problem,
> > though, as i've only GOT one dataset.
> >
> > TIA,
> >
> > --
> > Brian
> >
> >
>|||That's all well and good, but none of these apply to my situation! I have
only one dataset, period, yet i'm getting this error.
Is there another problem that could cause this sort of error?
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:Ot5fX7xfEHA.1048@.tk2msftngp13.phx.gbl...
> Both comments below are true: You can have several datasets in a
**report**
> but only bind one dataset to a **report item**.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "SQL" <nospam@.adfadfadf.com> wrote in message
> news:ufCl4HxfEHA.2812@.tk2msftngp13.phx.gbl...
> > Side note (may not be the solution to your problem):
> >
> > You can bind more than one dataset to a report! I've done this
> > successfully, and it's actually pretty easy.
> >
> >
> > "G" <brian.grant@.si-intl-kc.com> wrote in message
> > news:#jeQ0rwfEHA.3148@.TK2MSFTNGP10.phx.gbl...
> > > I get the following error when i try to add a new field being returned
> in
> > a
> > > dataset:
> > >
> > > "Report item expressions can only refer to fields within the current
> data
> > > set scope or, if inside an aggregate, the specified data set scope".
> > >
> > > I have no idea what this means, and i can reference just fine every
> other
> > > field i'm returning in the dataset.
> > >
> > > I found an earlier person who had this problem, and the response was
> "you
> > > can only bind one dataset to a report item". This can't be my problem,
> > > though, as i've only GOT one dataset.
> > >
> > > TIA,
> > >
> > > --
> > > Brian
> > >
> > >
> >
> >
>|||Found it!!!!
Dunno if this is a bug or expected behavior or what but....
I was using the custom query designer because i had a rather dynamic query
to write. When i added a new field in the return set, that field was NOT
automatically added to the field list in the dataset returned fields window.
I had to manually add that field. Solved the problem.
Brian
"G" <brian.grant@.si-intl-kc.com> wrote in message
news:OIUd%23Y6fEHA.236@.tk2msftngp13.phx.gbl...
> That's all well and good, but none of these apply to my situation! I have
> only one dataset, period, yet i'm getting this error.
> Is there another problem that could cause this sort of error?
>
> "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
> news:Ot5fX7xfEHA.1048@.tk2msftngp13.phx.gbl...
> > Both comments below are true: You can have several datasets in a
> **report**
> > but only bind one dataset to a **report item**.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "SQL" <nospam@.adfadfadf.com> wrote in message
> > news:ufCl4HxfEHA.2812@.tk2msftngp13.phx.gbl...
> > > Side note (may not be the solution to your problem):
> > >
> > > You can bind more than one dataset to a report! I've done this
> > > successfully, and it's actually pretty easy.
> > >
> > >
> > > "G" <brian.grant@.si-intl-kc.com> wrote in message
> > > news:#jeQ0rwfEHA.3148@.TK2MSFTNGP10.phx.gbl...
> > > > I get the following error when i try to add a new field being
returned
> > in
> > > a
> > > > dataset:
> > > >
> > > > "Report item expressions can only refer to fields within the current
> > data
> > > > set scope or, if inside an aggregate, the specified data set scope".
> > > >
> > > > I have no idea what this means, and i can reference just fine every
> > other
> > > > field i'm returning in the dataset.
> > > >
> > > > I found an earlier person who had this problem, and the response was
> > "you
> > > > can only bind one dataset to a report item". This can't be my
problem,
> > > > though, as i've only GOT one dataset.
> > > >
> > > > TIA,
> > > >
> > > > --
> > > > Brian
> > > >
> > > >
> > >
> > >
> >
> >
>|||Either that or you can use the static version of the query first, which will
populate the fields list for you, and then replace it with the the
corresponding query expression.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"G" <brian.grant@.si-intl-kc.com> wrote in message
news:up0IDI7fEHA.2020@.TK2MSFTNGP10.phx.gbl...
> Found it!!!!
> Dunno if this is a bug or expected behavior or what but....
> I was using the custom query designer because i had a rather dynamic query
> to write. When i added a new field in the return set, that field was NOT
> automatically added to the field list in the dataset returned fields
window.
> I had to manually add that field. Solved the problem.
> Brian
> "G" <brian.grant@.si-intl-kc.com> wrote in message
> news:OIUd%23Y6fEHA.236@.tk2msftngp13.phx.gbl...
> > That's all well and good, but none of these apply to my situation! I
have
> > only one dataset, period, yet i'm getting this error.
> >
> > Is there another problem that could cause this sort of error?
> >
> >
> > "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in
message
> > news:Ot5fX7xfEHA.1048@.tk2msftngp13.phx.gbl...
> > > Both comments below are true: You can have several datasets in a
> > **report**
> > > but only bind one dataset to a **report item**.
> > >
> > > --
> > > Ravi Mumulla (Microsoft)
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > "SQL" <nospam@.adfadfadf.com> wrote in message
> > > news:ufCl4HxfEHA.2812@.tk2msftngp13.phx.gbl...
> > > > Side note (may not be the solution to your problem):
> > > >
> > > > You can bind more than one dataset to a report! I've done this
> > > > successfully, and it's actually pretty easy.
> > > >
> > > >
> > > > "G" <brian.grant@.si-intl-kc.com> wrote in message
> > > > news:#jeQ0rwfEHA.3148@.TK2MSFTNGP10.phx.gbl...
> > > > > I get the following error when i try to add a new field being
> returned
> > > in
> > > > a
> > > > > dataset:
> > > > >
> > > > > "Report item expressions can only refer to fields within the
current
> > > data
> > > > > set scope or, if inside an aggregate, the specified data set
scope".
> > > > >
> > > > > I have no idea what this means, and i can reference just fine
every
> > > other
> > > > > field i'm returning in the dataset.
> > > > >
> > > > > I found an earlier person who had this problem, and the response
was
> > > "you
> > > > > can only bind one dataset to a report item". This can't be my
> problem,
> > > > > though, as i've only GOT one dataset.
> > > > >
> > > > > TIA,
> > > > >
> > > > > --
> > > > > Brian
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Friday, March 9, 2012

error with subquery.....

I am getting an error from a query that that has a subquery.

Msg 512, Level 16, State 1, Line 2

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

(0 row(s) affected)

This is a the query.

select *

from dhcp

where nameofcomputer = (SELECT p.nameofcomputer

FROM v_Pams_DHCP p

Left Outer Join adat2005_main a

ON p.nameofcomputer = a.nameofcomputer

where a.serialnumber is null)

Thanks in advance.

Gene

Use in operator,

Code Snippet

select

*

from

dhcp

where

nameofcomputer

in (

SELECT

p.nameofcomputer

FROM

v_Pams_DHCP p

Left Outer Join adat2005_main a

ON p.nameofcomputer = a.nameofcomputer

where

a.serialnumber is null

)

Exists Might be faster than IN,

Code Snippet

select

*

from

dhcp

where

Exists

(

SELECT

p.nameofcomputer

FROM

v_Pams_DHCP p

Left Outer Join adat2005_main a

ON p.nameofcomputer = a.nameofcomputer

where

a.serialnumber is null and p.nameofcomputer = dhcp.nameofcomputer

)

Sunday, February 26, 2012

Error while using sp_OAMethod

I get an error with HResult 10077 while using the sp_OAMethod to get an
'Item' from an array returned by VBScript.RegExp's Execute Method. Error
occurs after executing this for 3346 records.
I have seen article # 816937. But, didn't find much help.
My SQL Server version
===================
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows N
T
5.0 (Build 2195: Service Pack 4)
Can someone help me on this?
Kiran
Programmer AnalystCan you post some code to reproduce the issue?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
> I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>|||I encountered the memory leak problem (816937) myself recently. After a
while it stopped returning results and would occasionally throw errors. We
finally had to re-boot, and then I found another tool to handle RegEx's in
SQL. Here's the link to the one I'm using currently:
http://www.codeproject.com/database...asp#xx963223xx
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
>I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
> NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>

Friday, February 24, 2012

Error while using sp_OAMethod

I get an error with HResult 10077 while using the sp_OAMethod to get an
'Item' from an array returned by VBScript.RegExp's Execute Method. Error
occurs after executing this for 3346 records.
I have seen article # 816937. But, didn't find much help.
My SQL Server version
=================== Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT
5.0 (Build 2195: Service Pack 4)
Can someone help me on this?
--
Kiran
Programmer AnalystCan you post some code to reproduce the issue?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
> I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>|||I encountered the memory leak problem (816937) myself recently. After a
while it stopped returning results and would occasionally throw errors. We
finally had to re-boot, and then I found another tool to handle RegEx's in
SQL. Here's the link to the one I'm using currently:
http://www.codeproject.com/database/xp_pcre.asp#xx963223xx
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
>I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
> NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>

Error while using sp_OAMethod

I get an error with HResult 10077 while using the sp_OAMethod to get an
'Item' from an array returned by VBScript.RegExp's Execute Method. Error
occurs after executing this for 3346 records.
I have seen article # 816937. But, didn't find much help.
My SQL Server version
===================
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT
5.0 (Build 2195: Service Pack 4)
Can someone help me on this?
Kiran
Programmer Analyst
Can you post some code to reproduce the issue?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
> I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>
|||I encountered the memory leak problem (816937) myself recently. After a
while it stopped returning results and would occasionally throw errors. We
finally had to re-boot, and then I found another tool to handle RegEx's in
SQL. Here's the link to the one I'm using currently:
http://www.codeproject.com/database/...asp#xx963223xx
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:9913D55F-80D0-4357-A51B-470C5664E079@.microsoft.com...
>I get an error with HResult 10077 while using the sp_OAMethod to get an
> 'Item' from an array returned by VBScript.RegExp's Execute Method. Error
> occurs after executing this for 3346 records.
> I have seen article # 816937. But, didn't find much help.
> My SQL Server version
> ===================
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows
> NT
> 5.0 (Build 2195: Service Pack 4)
> Can someone help me on this?
> --
> Kiran
> Programmer Analyst
>