What is this 'Multiple-step OLE DB' error? - asp-classic

I'm doing a little bit of work on a horrid piece of software built by Bangalores best.
It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(
I'm getting this message when it tries to connect to my local database:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Line 38: MasterConn = New ADODB.Connection()
Line 39: MasterConn.connectiontimeout = 10000
Line 40: MasterConn.Open(strDB)
Anybody have a clue what this error means? Its connecting to my local machine (running SQLEXPRESS) using this connection string:
PROVIDER=MSDASQL;DRIVER={SQL Server};Server=JONATHAN-PC\SQLEXPRESS\;DATABASE=NetTraining;Integrated Security=true
Which is the connection string that it was initially using, I just repointed it at my database.
UPDATE:
The issue was using "Integrated Security" with ADO. I changed to using a user account and it connected just fine.

I ran into this a long time ago with working in ASP. I found this knowledge base article and it helped me out. I hope it solves your problem.
http://support.microsoft.com/kb/269495
If this doesn't work and everything checks out, then it is probably your connection string. I would try these steps next:
Remove:
DRIVER={SQL Server};
Edit the Provider to this:
Provider=SQLOLEDB;

As a side note, connectionstrings.com is a great site so you don't have to remember all that connection string syntax.

I came across this problem when trying to connect to an MySQL database via the wonderful Classic ASP. The solutions above didn't fix it directly, but I resolved it in the end by updating the ODBC Driver (from the long standing 3.51) to the latest version. I was then able to leave the driver line in (and not add the Provider bit), but I did have to update the connection string accordingly to:
Driver={MySQL ODBC 5.1 Driver};
That worked fine. Happy chappy.

Related

Microsoft OLE DB Provider for ODBC Drivers error '80004005' when adding new site to IIS 7 when driver works for another site?

I have a site that works as it should with my domain name(lets say it is https://mydoman1.se), and now I want to change the domainname to a new one (https://mydomain2.se) but still have https://mydoman1.se and redirect that to https://mydoman2.se.
So I added a new site(https://mydomain2.se) in the IIS and copied all the setting for the new site from the old site(https://mydomain1.se)
They are both pointing and using the same index.asp page.
I use this Connection:
ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER='localhost';Port=3306; DATABASE='db_name'; " &_
"UID='uname';PASSWORD='pwd'; OPTION=3;"
If I load https://mydomain1.se it works as it should, but if I load https://mydomain2.se then I get an error that it can´t find the Connection ?
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified
I also added a system DSN and when testing it, it connects as it should. So why doesn´t it found it when I know I added it?
I don´t understand why https://mydomain1.se is working and not the new one, they both use the same index file and Connection?
What Im I missing? Does it have anything to do with 32 and 64 system?
Any input really appreciated, thanks.
The problem that solved it was setting "Activate 32 bits programs" in the application pool in the IIS so it found the DSN.
One of our clients has faced the same issue. I have set the Enable 32 bit application to true and that has fixed his issue for the given error.

Microsoft Access connection to MYOB ODBC developer mode

I am running 32-bit Microsoft Access on Windows 8.1 and MYOB Premier 19.10
Have no problem setting up a 32 bit DSN and accessing MYOB in read only mode from Access.
Have installed developer key and have tested connection using TestConnection from MYOB. Test OK
When I now try to link to a MYOB table, I get a ODBC call failed - Cannot launch MYOB #20066 error. Have tried changing MYOB and Access to XP compatibility mode - still the same.
I also get the same error running on a Windows 7 machine.
Can someone please help.
gary
I am not familiar with Access, but if you are going to use a DSN to write to MYOB ODBC tables your connection string must look something like "DSN=YourMyobDsnName;ACCESS_TYPE=READ_WRITE". If Access does not allow you to add parameters to the connection string it's probably not going to work.
Another way connect to the company file is to use an ADO connection string. It would look something like "Driver={MYOAU1001};TYPE=MYOB;UID=Administrator; PWD=MyPassword;DATABASE=C:\PathToYourCompanyFile\CompanyFile.myo; HOST_EXE_PATH=C:\PathToTheMyobExecutable\MYOBP.exe;
ACCESS_TYPE=READ_WRITE;DRIVER_COMPLETION=DRIVER_NOPROMPT;KEY=AAAA...DDDD". Your paths and credentials will of course differ, as may the version of MYOB ODBC you are using. 10.01 is the most recent version in AU.
Following your comments I looked into it and now understand this capability is not available in Access. A common approach is to create a small executable that exchanges information between MYOB v19 ledgers and whatever it is you need to integrate with. Again, I am not an expert but it seems to me that you could use VBA in Access to accomplish this. VBA can use the ADO libraries.
I had to disable UAC on Windows 10 to get MYOB to launch via ODBC:
https://superuser.com/questions/83677/disabling-uac-on-windows-7

Can not tnsping but can sqlplus connect

I have a question hopefully someone could explain it to me. I have an Oracle 11g installed properly on the server. From a workstation, I have installed the oracle client which tnsname.ora pointed to the Oracle database. I can ping to the server where oracle db was installed. I can sqlplus connect to the database and I can even connect to the database programmatically using C#. However, I can not tnsping to it. I got error Message 3511 not found when trying to do so. So my question is: in what scenario tnsping is used and how do I make tnsping works? In other word, if my tnsping does not work but I still can connect to the database programmatically using C#, what are the concerns that I should be worrying about? I am new to Oracle.. Thanks!
I have tried to do the following actions without success although they are the most popular answers to similar scenario similar to mine.
1) Set Oracle_Sid to my oracle sid
2) Set Oracle_Home to my oracle home directory
What I did to solve the issue:
1) Uninstall oracle client
2) Reinstall the oracle client with the newest version 11.2.xx.
I believe, re-installing the oracle client of earlier version would just work as well.
However, since I have to re-install the client, I might want to get the newest version.
The cause is probably improper installation at the first time as we have an disk image of pre-installed application to automatically prep a new computer.
Not able tnsping does not seem to impede with other Oracle operations (at least not that I know of).
If someone knows what is the limitation of not able to tnsping but can sqlplus connect, ping... , I would appreciate if you could share.
Either your $Oracle_Home value is not set or your default sid is not set in $ORACLE_SID
Try this :
set ORACLE_SID=mysid
export ORACLE_SID
tnsping mysid
and see what it comes back with.

Websphere Application Server - Oracle 11g DB compatibility issue

I have been given an ad hoc reporting tool from another individual that has successfully deployed it to the field. He uses Web Logic servers and an Oracle database.
I tried to deploy the same application in my local environment (WAS 7 and Oracle). The first report runs flawlessly. However, when I run the second (or third or fourth) report, I get a very strange error: the second report is appended to the first report.
There is nothing in the code to account for this. This problem can be temporarily solved by stopping and starting the servers every time a report is run (obviously not a real solution). I think this has something to do with data sources and cached information. I then took a step back and tried to deploy it to a Tomcat server. It works perfectly, just like it does in the field. So my question is: are there any known issues between WAS 7 and Oracle 11g that could be causing this kind of problem? Any information would be very helpful.
Please ask about any specifics you may want to know and I will do my best to provide that information.
Thank you for your time.
EDIT: For anyone else looking into this, the problem was due to an incompatibility with the proprietary Oracle calls and Websphere. Once the application was edited to use only JDBC calls, everything works perfectly. Thanks.
This ended up being a incompatibility with using proprietary Oracle calls and Websphere. It was fixed by changing all of proprietary call to normal JDBC calls.

Configuring Oracle 11g client to work with 9i, in order to use ODP.NET for VS 2008 and C# or ASP.net, issues

I just have some issues regarding the usage of the latest oracle ODP.NET client , and using it to connect with ASP.NET 2008 and C# to an old Oracle 9i database. As stated in the ODP.NET instalation instructuins it should work, but I'm a little bit rusty when it comes to configure oracle.
The old 9i client has issues for .NET, it simply doesn't work it does the ORA-01036: illegal variable name/number' , is it needs updating. so I've installed the 11g one, runned the SQL scripts that come with the installer, now , the tricky part which I don't quite understand, is the files that go on Network/ADMIN the tnsnames.ora, sqlnet.ora , I just copied them from the 9i restarted and , it seems that by making a new connection on Servers on VS 2008 it works, then made a SQlDataConnection runed a query , tested it , I could see the retrieved rows using Oracle.DataAccess.Client.
When it comes to retrieve the same data in a grid for example, the page never loads, and it timeouts, something doesn't work ... added the reference to Oracle.DataAccess, tried even to make some code with a connection and a command , and it gives me the Data provider internal error(-3000) [System.String] using the same connection string i used in servers...
I'm sure that something is related with configuring the 11g client to work with my existing 9i database.
Note: the 9i client still exists on the system ,
The Microsoft .net Oracle provider doesn't work at all, and i would preffer not to use it , so I want to stick with ODP.net and the framework 2.0 for which is intended to work with.
I'm just curios what am I doing wrong, or how can I debug and find out what Oracle is complaining about.But it's like I said I'm no pro in Oracle , I just used it with preconfigured things, and used to work with MS SQL or MySQL which in this case they seem to work fine.
just an update on my progress. It seems that doesn't matter which vers. of ODP.net you install it will always have problems with SQLDataSource, it simly doesn't work, so if you try any other DataSource like ObjectDataSource with DataSet or other implementation, it's working and parametrized too but remember to use :PARAM , instead of #PARAM .
Jusst a piece of advice: remember to condifure your Network/Admin .ora files properly otherwise it won't work.
The way i did it was to install the v10 over the 9 then the 11g , then configure it. And this time it worked , no Data provider internal error(-3000) , but still with ORA-01036: illegal variable name/number' on SQLDataSource, so my advice don't uset it , never, just for demos, for a real project , think different.
Anyone has a different oppinion on how to do things with oracle differently ?

Resources