473,841 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3318
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 connectionstrin g is:

str_conn = "Provider=Micro soft.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 connectionstrin g is:

str_conn = "Provider=Micro soft.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.h u> wrote in message
news:%2******** ********@TK2MSF TNGP09.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.in c" -->
<%
Dim str_conn
Dim cn
Dim rs

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

set rs=server.Creat eObject("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
27304
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 machine (NT4, Access 2k), however as soon as I attempt to create anything on another machine (NT4, Access 2k) which most users will be working from, I receive an automation error. The problem line with the code is:
25
3754
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 machines. The code opens MS Word through Automation and then opens a particular Word doc. It's still working fine on most machines; but on one or two of them, the user is getting an Automation Error. The code used is as follows: Dim objWord As...
12
5542
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 and office XP components installed. ie I have word/access/excel 2k/xp/2003 installed. I tried to do a usual access 2k to word 2k automation yet I get the error "Automation Error" "ClassFactory cannot supply requested class" when on late binding try...
1
808
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 Excel.Application 'ADO Object for Excel Automation Public gstrExcelDir As String 'Source or Destination Directory
21
2575
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 document, parse the contents and write it to an Access table (the Access app, after opening Word, runs a macro within Word which parses and writes to the Access app via DAO). Occasionally we get an error from Word (such as "document is locked for...
0
1269
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 doesn't work. For example, when I go to delete an object such as a form or report, I get no confirmation of any kind...it either works or it doesn't (doesn't work if I have the report open).
2
2450
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, where I declare objects as follows: Dim oWordApp As New Microsoft.Office.Interop.Word.Application, after adding a reference to Microsoft.Office.Core and a reference to Microsoft Word. I could do this since I have the Primary Interop...
1
2348
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 doesn't fix the error. When I move to the next line the code reverts back to dim db as database. I am in access 97. When I try to close the application, access freezes up.
1
4430
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 control that links a number of other forms together, if the information is already in all of the corresponding tables then everything works fine but if I am entering new details then I am getting an error in 2 out of my 7 tabbed subforms. The error...
0
9865
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9706
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10303
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7851
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7025
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3140
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.