473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP .mdb ADO OLE automation error - but works in access!

Hello!

I have an ASP page using Jet 4.0 oldeb provider for mdb. (ADO 2.8). I use
the _same_ code in ASP from my well working VB application.
The problem is:

when I do the same "SELECT * FROM table WHERE field1 LIKE '%asdf%' " query,
it works in Access (SQL query) or in my VB .exe code, but generates OLE
automation error in ASP. The same code!!!
If I use "=" instead of LIKE, it works. (field1 is string type). But I need
LIKE...

Why have this? Any idea?
Jul 19 '05 #1
7 3296
What is the exact error message you are receiving?

SÁRINGER Zoltán wrote:
Hello!

I have an ASP page using Jet 4.0 oldeb provider for mdb. (ADO 2.8). I use
the _same_ code in ASP from my well working VB application.
The problem is:

when I do the same "SELECT * FROM table WHERE field1 LIKE '%asdf%' " query,
it works in Access (SQL query) or in my VB .exe code, but generates OLE
automation error in ASP. The same code!!!
If I use "=" instead of LIKE, it works. (field1 is string type). But I need
LIKE...

Why have this? Any idea?


Jul 19 '05 #2
SÁRINGER Zoltán wrote:
Hello!

I have an ASP page using Jet 4.0 oldeb provider for mdb. (ADO 2.8).
I use the _same_ code in ASP from my well working VB application.
The problem is:

when I do the same "SELECT * FROM table WHERE field1 LIKE '%asdf%' "
query, it works in Access (SQL query) or in my VB .exe code, but
generates OLE automation error in ASP. The same code!!!
If I use "=" instead of LIKE, it works. (field1 is string type). But
I need LIKE...

Why have this? Any idea?


Show us the error message.

Are you using dynamic sql? If so, Use response.write to see the actual
query being sent to the database.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #3
First, thank you for your replies...!

I've put onto web the screenshots:

http://www.optinfo.hu/helpme/ie_err.jpg (hungarian message in IE about the
500.x http error, and error number)
http://www.optinfo.hu/helpme/jet_like_error.jpg (debug screen in Interdev,
on the line: rs.open "SELECT...")

the connectionstring is:

str_conn = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database
Password=;Data Source=g:\vb60\autoflex-feladatutemezo\db\feladat.mdb;"

Everything else are the defaults. Really, if I change "LIKE" to "equal" it
works. This is a very simple code!!!! What do you recommend? Why doesnt work
this simple query in ASP, what is the difference using the same ADODB
component in VB6 or in ASP? (How can I ensure that ASP uses ADO 2.8.. (in
VB6 I can select in the referencies, but in ASP...?)

waiting for your suggestions...
Zoltan
Jul 19 '05 #4
SÁRINGER Zoltán wrote:
First, thank you for your replies...!

I've put onto web the screenshots:

http://www.optinfo.hu/helpme/ie_err.jpg (hungarian message in IE
about the 500.x http error, and error number)
http://www.optinfo.hu/helpme/jet_like_error.jpg (debug screen in
Interdev, on the line: rs.open "SELECT...")

the connectionstring is:

str_conn = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database
Password=;Data Source=g:\vb60\autoflex-feladatutemezo\db\feladat.mdb;"
If g: is a mapped network drive, your IUSR account will probably not be able
to find it. You should use the UNC nomenclature in that case. Also, you need
to force this website to run under a domain account instead of the default
local IUSR account. Based on your below statement that changing "LIKE" to
"=", I doubt that this is your problem, In fact, I've probably wasted my
time typing this, since if this was a problem, you would be talking to us
about connection failure instead of OLE Automation Error ....

Everything else are the defaults. Really, if I change "LIKE" to
"equal" it works. This is a very simple code!!!! What do you
recommend? Why doesnt work this simple query in ASP, what is the
difference using the same ADODB component in VB6 or in ASP? (How can
I ensure that ASP uses ADO 2.8.. (in VB6 I can select in the
referencies, but in ASP...?)

waiting for your suggestions...
Zoltan


Everything I've found about this error indicates a problem with your MDAC
installation. Go to the microsoft site and download the Component Checker
which will verify the problem (mismatched dll's). The fix will depend on
your operationg system.

Bob barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5
SÁRINGER Zoltán wrote:
Hello,

Bob, attached the result of component checker.
I'm not the person who needs to see that. If it contains errors, and you do
not know how to correct them, then you need to call MS Product Support.

I have simple JET database with simple query. It works from Access
<snip>
Please help me!


I'm stumped. There is nothing to be found in Google about your error beyond
there being a problem with MDAC.I've read that MDAC problem in W2K can be
corrected by running Windows Setup and choosing the Repair option.

Beyond that I think you need to call MS Product Support. If you get this
resolved we would appreciate you posting the solution so we can help the
next person with this problem.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #6
What is the data type of the field "megjegyzes"?

--
Brendan Reynolds (Access MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
"SÁRINGER Zoltán" <in**@optinfo.hu> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

Bob, attached the result of component checker.

I have simple JET database with simple query. It works from Access and VB
and WSH, but generates OLE automation error in ASP. The exact problem is the LIKE operator. If I change this to '=', works!
The PC is pure:
- W2000 SP4, (hun)
- JET SP8, (hun)
- MDAC 2.8, (hun)
- VB6-Interdev SP6
only on clean w2000 works, but i don't know what software installation
causes the problem. Maybe language or national setting problem somewhere in IIS?

<!-- #include file="adovbs.inc" -->
<%
Dim str_conn
Dim cn
Dim rs

set cn=server.createobject("ADODB.Connection")
str_conn = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database
Password=;Data Source=g:\vb60\autoflex-feladatutemezo\db\feladat.mdb;"
cn.Open str_conn

set rs=server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM feladat WHERE megjegyzes LIKE '%12345%' ",cn
set rs=nothing
set cn=nothing
%>

See the screenshots at:

http://www.optinfo.hu/helpme/

The problem is exactly the 'LIKE' keyword, not permission or anything
else...

Please help me!

Jul 19 '05 #7
field "megjegyzes" is:
string (250), unicode, "non required", non indexed, no allow NULLs

but in w2k works, just some software installation messes it up. Now I'm
going to install opsys from the begining, and watch when will not work...

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Ange T | last post by:
Hi there, I'm having pain with the VB behind an Access form. The form is used to create reports in Excel based on the details entered in the form. This has always worked without error on my...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
12
by: Cheval | last post by:
Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003? I have recently installed office 2003 in a new folder and have left the older office 2000...
1
by: Jimmer | last post by:
I've got what should be an easy automation problem, but the solution simply isn't coming to me. I've got several public variables set up for automation as follows: Public gappExcel As...
21
by: Neil | last post by:
Is there a way to trap an error generated in another app that is controlled via automation? I have an Access 2000 app that opens Word 2000 and proceeds to open a series of documents and, in each...
0
by: Matt | last post by:
Hello, I am having an issue when I try to automate Access. When working in the automated application, it seems that all warning messages have been disabled and error handling in reports...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
1
by: one1george | last post by:
Hello, When I create a switchboard in access and then try to open it, it gives me a automation error. I have tryed changing the code from dim db as database to dim db as dao.database and this...
1
by: acog1 | last post by:
Hi everyone, I know that there is a question similar to this already posted but the answer to it does not really seem to relate to my problem! So here goes... I have a main form which has a tab...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...

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.