ADO Error 3001 Question !! 
Author Message
 ADO Error 3001 Question !!

Sorry if this shows up more than once.  I had an error when I tried to send
it. I am not trying to spam or anything.

Please help

I have a ADO 2.5 recordset that is referencing  a recordset from a
DataEnvironment connected to SQL Server 7.  When I try to set the Filter
property with the any of the following everything is fine:

Field1 = 'Value1' OR Field1 = 'Value2'
--or--
( Field1 = 'Value1' ) AND ( Field2 = #ValueDate# )

but when I try the following I get error 3001

( Field1 = 'Value1' OR Field1 = 'Value2' ) AND ( Field2 = #ValueDate# )

I have checked MSDN and found Q216873 that states that this is a legal way
to set a filter but it is not working.

Can anyone help?  PLEASE!!!!!

Edmund



Tue, 29 Oct 2002 03:00:00 GMT
 ADO Error 3001 Question !!

Check this:

PRB: "Run-time Error 3001" with ADO Command Object and adCmdTableDirect



Tue, 29 Oct 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Oops!
http://support.microsoft.com/support/kb/articles/Q248/0/76.ASP
Quote:

>Check this:

>PRB: "Run-time Error 3001" with ADO Command Object and adCmdTableDirect



Tue, 29 Oct 2002 03:00:00 GMT
 ADO Error 3001 Question !!

Sorry this does not help me.  My recordset is already open. Its the
filtering that is giving me problems.

Thanks anyway.


Quote:
> Check this:

> PRB: "Run-time Error 3001" with ADO Command Object and adCmdTableDirect



Tue, 29 Oct 2002 03:00:00 GMT
 ADO Error 3001 Question !!
What in the world is going on with ADO Filter properties.  Does anyone
understand why these work ...

(Field2 > #Date1# AND Field2 < #Date2#)
--and--
(Field1 = 'Value1' OR Field1 = 'Value2' )
--and--
Field1 = 'Value1' AND (Field2 > #Date1# AND Field2 < #Date2#) OR Field1 =
'Value2'

while this does not work ...

(Field1 = 'Value1' OR Field1 = 'Value2' ) AND (Field2 > #Date1# AND Field2 <
#Date2#)

My situation is that I have a filter form that the user can input any number
of criteria into several textboxes.    If only one textbox is inputed into
than WHERE staments like example 1 and 2 will be built which are accepted by
the ADO 2.5 recordset.

Since I do not know how many textboxes the user will input into or the list
of criteria they will specify I loop through the controls and build the
WHERE statement.  This means that I have to have the syntax like that in my
last example that is a valid WHERE statement but that is rejected by the ADO
recordset with error 3001.

Why is it that the most syntaxicaly correct statment is the one that gets
rejected?  I've looked at Q216873 and Q248076 but they do not address the
problem.

MS I REALLY need a "real" work around to this problem that will result in
the recordset being filtered, this has already held me back a day and a
half.  I can not create a new recordset because this is a sycronized
DataEvironment "Shaped" recordset that is being used by several DataRepeater
controls.

PLEASE HELP !

Edmund



Tue, 29 Oct 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Edmund,

Sorry to say this, but based on comments I've seen in this NG, you may be on
shaky ground using either the DataEnvironment or the DataRepeater. Using
them together is therefore even scarier. You might want to do some research
on the known bugs in each before basing an application on them.

Mark Holder


Quote:
> What in the world is going on with ADO Filter properties.  Does anyone
> understand why these work ...

> (Field2 > #Date1# AND Field2 < #Date2#)
> --and--
> (Field1 = 'Value1' OR Field1 = 'Value2' )
> --and--
> Field1 = 'Value1' AND (Field2 > #Date1# AND Field2 < #Date2#) OR Field1 =
> 'Value2'

> while this does not work ...

> (Field1 = 'Value1' OR Field1 = 'Value2' ) AND (Field2 > #Date1# AND Field2
<
> #Date2#)

> My situation is that I have a filter form that the user can input any
number
> of criteria into several textboxes.    If only one textbox is inputed into
> than WHERE staments like example 1 and 2 will be built which are accepted
by
> the ADO 2.5 recordset.

> Since I do not know how many textboxes the user will input into or the
list
> of criteria they will specify I loop through the controls and build the
> WHERE statement.  This means that I have to have the syntax like that in
my
> last example that is a valid WHERE statement but that is rejected by the
ADO
> recordset with error 3001.

> Why is it that the most syntaxicaly correct statment is the one that gets
> rejected?  I've looked at Q216873 and Q248076 but they do not address the
> problem.

> MS I REALLY need a "real" work around to this problem that will result in
> the recordset being filtered, this has already held me back a day and a
> half.  I can not create a new recordset because this is a sycronized
> DataEvironment "Shaped" recordset that is being used by several
DataRepeater
> controls.

> PLEASE HELP !

> Edmund



Fri, 01 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!

WHAT??!!!

You mean I have to redesign my entire data access strategy!!

If I have to to that because MS released this product with the full
knowledge that it does not work I'll go mad.  I swear if it comes to that
that I will move to Sun's Java or Novell's VB.  This is maddness!!!  That
would put me way off on my timeline.

Microsoft - How could you do this to your customers!!!!!

AARRRHHHGGG!!!!!!


Quote:
> Edmund,

> Sorry to say this, but based on comments I've seen in this NG, you may be
on
> shaky ground using either the DataEnvironment or the DataRepeater. Using
> them together is therefore even scarier. You might want to do some
research
> on the known bugs in each before basing an application on them.

> Mark Holder



> > What in the world is going on with ADO Filter properties.  Does anyone
> > understand why these work ...

> > (Field2 > #Date1# AND Field2 < #Date2#)
> > --and--
> > (Field1 = 'Value1' OR Field1 = 'Value2' )
> > --and--
> > Field1 = 'Value1' AND (Field2 > #Date1# AND Field2 < #Date2#) OR Field1
=
> > 'Value2'

> > while this does not work ...

> > (Field1 = 'Value1' OR Field1 = 'Value2' ) AND (Field2 > #Date1# AND
Field2
> <
> > #Date2#)

> > My situation is that I have a filter form that the user can input any
> number
> > of criteria into several textboxes.    If only one textbox is inputed
into
> > than WHERE staments like example 1 and 2 will be built which are
accepted
> by
> > the ADO 2.5 recordset.

> > Since I do not know how many textboxes the user will input into or the
> list
> > of criteria they will specify I loop through the controls and build the
> > WHERE statement.  This means that I have to have the syntax like that in
> my
> > last example that is a valid WHERE statement but that is rejected by the
> ADO
> > recordset with error 3001.

> > Why is it that the most syntaxicaly correct statment is the one that
gets
> > rejected?  I've looked at Q216873 and Q248076 but they do not address
the
> > problem.

> > MS I REALLY need a "real" work around to this problem that will result
in
> > the recordset being filtered, this has already held me back a day and a
> > half.  I can not create a new recordset because this is a sycronized
> > DataEvironment "Shaped" recordset that is being used by several
> DataRepeater
> > controls.

> > PLEASE HELP !

> > Edmund



Fri, 01 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Edmund,

I did not go so far as to say that you need to redesign your system. I only
meant to warn you that the tools you mentioned have been accused by others
in this NG of being buggy.

You should do your own reseach into these problems to see if they apply to
your use of the tools.

I don't think MS released them knowing they don't work. They just did not
(and probably cannot) test them in every way they can be used.

Mark Holder


Quote:

> WHAT??!!!

> You mean I have to redesign my entire data access strategy!!

> If I have to to that because MS released this product with the full
> knowledge that it does not work I'll go mad.  I swear if it comes to that
> that I will move to Sun's Java or Novell's VB.  This is maddness!!!  That
> would put me way off on my timeline.

> Microsoft - How could you do this to your customers!!!!!

> AARRRHHHGGG!!!!!!



Fri, 01 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Ok, maybe I over re-acted BUT ...

I am using
Microsoft's Active Data Objects and
Microsoft's Data Controls in
Microsoft's Visual Basic developement environment to access tables in
Microsoft's SQL Server 7 running on
Microsoft's NT Server from
Microsoft's NT Workstation on a network that uses all and nothing but
Microsoft's Back Office and
Microsoft's Server tools while using
Microsoft's MSDN developement suggestions.

Now,  how is it that Microsoft could not test ADO with my setup and my data
access strategy (which is based on what Microsoft suggested) to see if a
simple, no... a basic SQL WHERE statement would take in the ADO Filter
property.

I just don't understand it.  It should work!

Edmund


Quote:
> Edmund,

> I did not go so far as to say that you need to redesign your system. I
only
> meant to warn you that the tools you mentioned have been accused by others
> in this NG of being buggy.

> You should do your own reseach into these problems to see if they apply to
> your use of the tools.

> I don't think MS released them knowing they don't work. They just did not
> (and probably cannot) test them in every way they can be used.

> Mark Holder



> > WHAT??!!!

> > You mean I have to redesign my entire data access strategy!!

> > If I have to to that because MS released this product with the full
> > knowledge that it does not work I'll go mad.  I swear if it comes to
that
> > that I will move to Sun's Java or Novell's VB.  This is maddness!!!
That
> > would put me way off on my timeline.

> > Microsoft - How could you do this to your customers!!!!!

> > AARRRHHHGGG!!!!!!



Fri, 01 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Edmund,

Before we assume the problem is with MS, how about setting up a simplified
test? Write a piece of code using an ADO 2.5 Recordset connected directly to
SQL Server (meaning without using the DataEnvironment), and see if the
filter works there. I'm guessing it will. Then, work your way up to see
exactly which component is causing the problem. I'm betting $0.02 on the
DataEnvironment, BTW.

Mark Holder


Quote:
> Ok, maybe I over re-acted BUT ...

> I am using
> Microsoft's Active Data Objects and
> Microsoft's Data Controls in
> Microsoft's Visual Basic developement environment to access tables in
> Microsoft's SQL Server 7 running on
> Microsoft's NT Server from
> Microsoft's NT Workstation on a network that uses all and nothing but
> Microsoft's Back Office and
> Microsoft's Server tools while using
> Microsoft's MSDN developement suggestions.

> Now,  how is it that Microsoft could not test ADO with my setup and my
data
> access strategy (which is based on what Microsoft suggested) to see if a
> simple, no... a basic SQL WHERE statement would take in the ADO Filter
> property.

> I just don't understand it.  It should work!

> Edmund



> > Edmund,

> > I did not go so far as to say that you need to redesign your system. I
> only
> > meant to warn you that the tools you mentioned have been accused by
others
> > in this NG of being buggy.

> > You should do your own reseach into these problems to see if they apply
to
> > your use of the tools.

> > I don't think MS released them knowing they don't work. They just did
not
> > (and probably cannot) test them in every way they can be used.

> > Mark Holder



> > > WHAT??!!!

> > > You mean I have to redesign my entire data access strategy!!

> > > If I have to to that because MS released this product with the full
> > > knowledge that it does not work I'll go mad.  I swear if it comes to
> that
> > > that I will move to Sun's Java or Novell's VB.  This is maddness!!!
> That
> > > would put me way off on my timeline.

> > > Microsoft - How could you do this to your customers!!!!!

> > > AARRRHHHGGG!!!!!!



Sat, 02 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Mark:

The problem is with MS because they released the DataEnvironment and said it
worked.  They talked highly about its capabilities and herald it as the next
step in data access along with ADO.  Now when a person goes to use it as
they suggest it be used the basic functionality that should be provided does
not function.  It is not even some outlandish WHERE statement, its a basic
statement.  If it were some fancy 'tweak' statement that did not work then I
would understand.

Listen, I like Microsoft. I defend MS against those that would talk ill of
it.  In fact I even completed a couple of Microsoft certifications. However
this is unacceptable.  My development schedule is totally blown because now
I have go back and re-design my data access strategy for this system.  What
truly annoys me is that Microsoft should have tested ADO with SQL Sever and
the DataEnvironment.  If they did then this would have jumped out at them
just as it jumps out at me every time I go to apply a filter to one of the
Recordsets.

When you follow all the rules and guide lines and get errors back that have
no solution it really, really ... Really pisses you off.

Edmund



Sat, 02 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
Edmund-

I feel your pain, and I don't like MS at all. It has become what IBM was
before the Justice Dept. held them up and MS broke them down.

Meanwhile, back in the world we have to deal with, have you determined that
the DataEnvironment is the problem? If so, there is probably a relatively
painless work around available.

Mark Holder


Quote:
> Mark:

> The problem is with MS because they released the DataEnvironment and said
it
> worked.  They talked highly about its capabilities and herald it as the
next
> step in data access along with ADO.  Now when a person goes to use it as
> they suggest it be used the basic functionality that should be provided
does
> not function.  It is not even some outlandish WHERE statement, its a basic
> statement.  If it were some fancy 'tweak' statement that did not work then
I
> would understand.

> Listen, I like Microsoft. I defend MS against those that would talk ill of
> it.  In fact I even completed a couple of Microsoft certifications.
However
> this is unacceptable.  My development schedule is totally blown because
now
> I have go back and re-design my data access strategy for this system.
What
> truly annoys me is that Microsoft should have tested ADO with SQL Sever
and
> the DataEnvironment.  If they did then this would have jumped out at them
> just as it jumps out at me every time I go to apply a filter to one of the
> Recordsets.

> When you follow all the rules and guide lines and get errors back that
have
> no solution it really, really ... Really pisses you off.

> Edmund



Sat, 02 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!
This is probably a stupid suggestion but, what the heck.

 ((Field1 = 'Value1'  AND (Field2 > #Date1# AND Field2 < #Date2#)) or
 ((Field1 = 'Value2'  AND (Field2 > #Date1# AND Field2 < #Date2#))

Personally, I do not use filters on record sets directly, but I have
used them "after" the pull to bypass the undesired data.  I also have
used stored proceedures to bypass the need for them.
(Yes, it is doable but you will need either multiple SP'd or a fairly
robust interface that lets you specify type)

Richard

Quote:

> What in the world is going on with ADO Filter properties.  Does anyone
> understand why these work ...

> (Field2 > #Date1# AND Field2 < #Date2#)
> --and--
> (Field1 = 'Value1' OR Field1 = 'Value2' )
> --and--
> Field1 = 'Value1' AND (Field2 > #Date1# AND Field2 < #Date2#) OR Field1 =
> 'Value2'

> while this does not work ...

> (Field1 = 'Value1' OR Field1 = 'Value2' ) AND (Field2 > #Date1# AND Field2 <
> #Date2#)

> My situation is that I have a filter form that the user can input any number
> of criteria into several textboxes.    If only one textbox is inputed into
> than WHERE staments like example 1 and 2 will be built which are accepted by
> the ADO 2.5 recordset.

> Since I do not know how many textboxes the user will input into or the list
> of criteria they will specify I loop through the controls and build the
> WHERE statement.  This means that I have to have the syntax like that in my
> last example that is a valid WHERE statement but that is rejected by the ADO
> recordset with error 3001.

> Why is it that the most syntaxicaly correct statment is the one that gets
> rejected?  I've looked at Q216873 and Q248076 but they do not address the
> problem.

> MS I REALLY need a "real" work around to this problem that will result in
> the recordset being filtered, this has already held me back a day and a
> half.  I can not create a new recordset because this is a sycronized
> DataEvironment "Shaped" recordset that is being used by several DataRepeater
> controls.

> PLEASE HELP !

> Edmund



Sun, 03 Nov 2002 03:00:00 GMT
 ADO Error 3001 Question !!

I did the check and created a Connection without using the DataEnvironment.
It turns out that the problem IS with ADO 2.5. I referenced ADO 2.1 and then
ADO 2.0 and got the same error 3001 both times.

Microsoft, what am I to do now!!!????

Should I go backwards to DAO?  What is with this ADO?!! I am totally
screwed!!

Has this been "recognized" by MS as a bug?  If so can someone direct me to
the KB item so I can have a read.

I am utterly disapointed and frustrated with MS.  You could at least respond
to the message and let me know you have identified that this is a bug with
ADO.

Edmund



Mon, 04 Nov 2002 03:00:00 GMT
 
 [ 21 post ]  Go to page: [1] [2]

 Relevant Pages 

1. ADO Error 3001 Question !!

2. ADO recordset filter using wildcards - results in error 3001

3. ADO 3001 error with ADODB.COMMAND

4. Error 3001 when creating adLongVarWChar or adLongVarBinary field dynamically in ADO recordset

5. Error 3001: Invalid argument

6. Please help: Run-time error '3001'

7. Run-time Error 3001

8. Create local cube, got Error# 3001

9. Error 3001 - Invalid argument

10. Error 3001 on CreateDatabase

11. Setting Filter causes error 3001

12. Error 3001


 
Powered by phpBB® Forum Software