ODBC Error: Driver not capable - vb.net

I'm establishing an ODBC connection to our AS/400 in an app I'm developing. It simply does a DELETE and then an INSERT. Nothing crazy or complicated. Everything works great on my 64-bit Windows 7 Pro desktop (UPDATE: no longer true) but when I try to run the app on my 32-bit laptop for a presentation, I get the following error:
ERROR [S1C00] [Micro Focus][Rumba Data Access][S1023934]Driver not
capable. SQLSetConnectOption ERROR [IM006] [Microsoft][ODBC Driver
Manager] Driver's SQLSetConnectAttr failed ERROR
[01000][Microsoft][ODBC Driver Manager] The driver doesn't support the
version of ODBC behavior that tha pplication requested (see
SQLSetEnvAttr). ERROR [08004][Micro Focus][RUMBA Data
Access][S1023934]Data source rejected establishment of connection.
APPC Primary RC = Allocation_Error; Secondary RC =
Allocation_Failure_No_Retry.
I'm not sure what's going on. I may have messed something up when setting up the DSN on the 32-bit laptop but it looks exactly the same as what I set up on the 64-bit desktop... Is there something different between the 32-bit and 64-bit versions or is there something else going on?
Thanks!
EDIT: I just tried it on another 64-bit desktop and I got the same error. There must be something wrong with how I'm setting up the DSN since I set it up on my machine months ago and could be forgetting something.
EDIT2: I ran Windows Update on the desktop where everything worked on and now it doesn't work there either. Is it possible a buggy Windows Update could be causing my issues?
EDIT3: I was asked in the comments to enable tracing and see what happens. Skimming through it, here are a few notable messages:
EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
and:
EXIT SQLGetDiagRecW with return code 100 (SQL_NO_DATA_FOUND)
Everything else looks like it exits with a status of 0 (SQL_SUCCESS)

The issue was resolved by installing this Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update.
According to Microsoft,
A security issue has been identified leading to a vulnerability in MFC applications that are built with Visual Studio 2005 and ship the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package.
Why installing a security patch (rather than a bug fix patch) solved this is beyond me...

Using ODBC Administrator, turn on tracing. Try your application and look at the log file for SQL_ATTR_ODBC_VERSION. You should see something like this:
odbct32w fc0-1ad0 ENTER SQLSetEnvAttr
SQLHENV 0x007A1DE0
SQLINTEGER 200 <SQL_ATTR_ODBC_VERSION>
SQLPOINTER 3 <SQL_OV_ODBC3>
SQLINTEGER 0
odbct32w fc0-1ad0 EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 0x007A1DE0
SQLINTEGER 200 <SQL_ATTR_ODBC_VERSION>
SQLPOINTER 3 <SQL_OV_ODBC3>
SQLINTEGER 0
The difference will be that yours is returning SQL_ERROR instead of success. Check what the third parameter is (in my case SQL_OV_ODBC3). Most likely whatever version your application is setting is newer that what your ODBC driver supports. You'll need to refrain from using newer ODBC features or upgrade your driver to something one that supports a higher level of ODBC.

Related

Microsoft Access SQL Database connection with Python 3.7.9 [duplicate]

When trying to make a program on Windows that connects to a database via ODBC, I got the following error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
I'm sure my code is right. It even worked on a different PC.
Why am I getting this error? And How do I fix it?
What causes this error?
The error message tells you, simply put, that the ODBC Driver Manager could not find the driver you specified in your connection string or DSN.
This can have 3 common causes:
The driver you tried to use is not installed on your system
The driver is installed, however, it doesn't match bitness of the code you're running
You made an error in typing the driver name
How do I check which drivers are installed on my system?
You can check the drivers which are installed on your system by going to the ODBC Data Source Administrator. To open it, press ⊞ Win + R, and type in: odbcad32.exe. Then check the tab Drivers for installed drivers. The Name column indicates the exact name you should use in your connection string or DSN.
If you're on 64-bit Windows, that only lists the 64-bit drivers installed on
your system. To see which 32-bit drivers are installed, press press ⊞ Win + R, and type in: C:\Windows\SysWOW64\odbcad32.exe, and go to the Drivers tab again.
The driver is installed, but it might be the wrong bitness, what do I do?
Then, you have two choices, either adjust the bitness your program is running in, or install a driver with a different bitness.
Some of the drivers that are installed by default on Windows only have a 32-bits variant. These can't be used with 64-bits programs.
You can usually identify which bitness a program is running under in task manager. In Windows 10, all 32-bit programs have (32-bit) appended to their name. If that isn't there, you're likely running a 64-bit program, and most modern programming languages and environments run on 64-bit by default, but allow you to switch to 32-bit. However, the specifics for different programming languages are outside the scope of this question.
How can I verify I didn't mistype the driver name?
An ODBC connection string looks like this:
DRIVER={DriverName};ParameterName1=ParameterValue1;ParameterNameN=ParameterValueN;
The driver name part needs to be delimited by curly braces if it might contain special characters, and needs to exactly match the installed driver name, as found in the ODBC Data Source Administrator, including spaces and typographical characters, but excluding capitalization.
Note that for deployed code, the driver must be present on the computer/server running the code.
I don't have the driver, or have the wrong bitness, where do I get the right one?
That depends on which driver you want to use.
A list of common drivers with download locations (all 32-bit and 64-bit at the same URL):
The Microsoft ODBC Driver 17 for SQL Server
The Microsoft Access database driver, which is part of the Microsoft Access Database Engine. Note that simultaneous installations of 32-bit and 64-bit Access ODBC drivers are not supported.
The MySQL ODBC connector by Oracle
The open-source SQLite ODBC driver by Christian Werner (non-official)
psqlODBC, the official PostgreSQL driver
If the driver you want to use isn't listed, the location is usually easily found using Google.
In design mode, a value has been set to the property of
TFDConnection.ConnectionDefName must be empty.

[RESOLVE]ODBC Driver Manager] Data Source name not found and no default driver specified

I created a vb project and made an installer of it, it works fine with my pc and it also works on some of the users who used the system on their machine, but then there's this particular user of received this error, please help T.T
I tried...
checking my connection string on my vb project just to make sure, but it's fine.
check if my system deployed is 32 bit and the MySQL ODBC connector, both are 32 bit.
tried checking if the MySQL ODBC driver is properly installed on the 32-bit ODBC data source,
I search this win + R (c:\windows\sysWOW64\odbcad32.exe) to make sure that I'm in a 32-bit data source since both 64 bit and 32-bit data source has the same name on my laptop.
also, i notice that the drivers installed on 32 bit data source doesn't have version,company and such (refer to image 2), while on the 64 bit data source it does have version, company and such (refer to image 1).
it turns out that the network of that particular user has block the access to the installed drivers, it got resolve when they connect to a different network.

IBM RAD fails with JVM crash after importing a project into it .shows "jvm terminated exit code 8096"

jvm terminated exit code 8096 is shown
here follows my eclipse.ini coding
-vm
C:\Program Files (x86)\IBM\SDP70\jdk\jre\bin\javaw.exe
-vmargs
-Xquickstart
-Xms512m
-Xmx1024ms
-Xgcpolicy:gencon
-Xscmx96m
-Xshareclasses:singleJVM,keep
-Xnolinenumbers
-XX:MaxPermSize=1024M
-Dsun.java2d.d3d=false
-Dsun.java2d.noddraw=true
This behavior might be caused by the incorrect rendering on a small set of Microsoft Windows computers with bad DirectDraw or Direct3D drivers. Hence, the use of DirectDraw or Direct3D drivers by Java 2D system in Rational Application Developer v7 can cause the crash.
Note: This error is not always caused as the result of DirectDraw or Direct3D drivers.
Resolving the problem
Consider upgrading to the latest Rational Application Developer v7.0.x release before carrying out the option of disabling Direct3D.
In the case of Rational Application Developer v8.0 or later versions on a Windows 64-bit platform experiencing this JVM error, consult the technote "Internet Explorer v9 or higher is required if the product was installed using the 64-bit Bit Mode option on a 64-bit system". This addresses the jscript.dll error showing in a javacore.
You can also try clearing the temp folder as described in the following forum post. The workaround presented is for Lotus Notes, but may also apply in this case.
WORKAROUND:
To turn off the use of Direct3D in Rational Application Developer v7, you can use the following Java parameter option:
-Dsun.java2d.d3d=false
If that does not solve the problems, try removing DirectDraw or Direct3D completely using:
-Dsun.java2d.noddraw=true
Note: You can put this Java parameter option inside the eclipse.ini in the directory \SDP70\
Open a service request with IBM support if none of the suggestions above have helped to resolve the problem.
Reference Click Here

microsoft.ace.oledb.12.0 provider is not registered error fixing from code behind

My application is working fine in 32 bit machine but when i rum my application from 64bit machine it is showing error like "microsoft.ace.oledb.12.0 provider is not registered". i searched for the solution and every one suggesting about installing 64 bit compatible OLEDB driver .I would like to know whether it is fixed from code behind.Any valuuble suggestion are appreciated.
Thanks in advance
Subin
My answer might look strange but have you seen this solution 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine solution?
I mean especially first approach.
You can change the target CPU to work on 64bit and 32bit
Go to the startup project of your program.
Open the properties window.
Click the compile tab.
Click advanced compile options.
Change the target CPU options to any CPU.

Simple-OpenNI for Processing fatal errors with the Kinect

I have been using SimpleOpenNI, a wrapper for Processing, all summer now. I use it for the Kinect to make games and demos. Last week, I have been getting a fatal error in my processing window and none of the SimpleOpenNI projects will work. Here is the error:
SimpleOpenNI Version 0.20
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x72e8f955, pid=4596, tid=4624
JRE version: 6.0_24-b07
Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0xf955]
An error report file with more information is saved as:
C:\Users\mss042\Desktop\processing-1.5.1\hs_err_pid4596.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
It appears as if the new OpenNI/NITE/SensorKinect drivers do not work with the SimpleOpenNI wrapper. I have tried it with people using the old drivers and everything still works. Problem is, you cannot download the old drivers off of the websites so I cannot test if it's that or not. You can see everything I've downloaded from the simpleopenni site: http://code.google.com/p/simple-openni/
Any help with this error would be appreciated. Thanks.
Mike
It looks like there's a problem with OpenNI.dll. Make sure that:
You have the dll (It should be in Program Files where you've installed OpenNI)
Make sure you've got the Environment Variables for the Open NI paths and that the paths are correct, otherwise, you might have the .dll file, but the .jnilib wouldn't know where it is.
Had a Kinect Workshop in Uni, and my colleagues using Windows all had issues with the drivers,
so I'm just passing on what they did:
Even though they had 64-bit versions of Windows they used the 32-bit version, and used Brekel OpenNI Kinect Auto Installer - Developer Edition v1.3.2.3.exe(direct link via developkinect.com) after reading this message:
Comment 4 by tijmenva...#gmail.com, Oct 21, 2011 Hey all I have Solved
the unsatisfied link dll error on windows 7 64 bits by installing java
runtime (jre-7u1-windows-i586.exe)and (Brekel OpenNI Kinect Auto
Installer - Developer Edition v1.3.2.3.exe) I uninstalled everything
and than it worked :)
hope this helpes
in Issue#17 on the SimpleOpenNI project issues page.
Another colleague used Synapse and OSC in Processing instead of SimpleOpenNI, but she had loads of errors with the drivers (basically spent a few good hours uninstalling/installing different versions). In her case, uninstalling any previous partial or complete drivers from the machine and deleting any registry entries related to PrimeSense(Sensor, Nite) and OpenNI, then using the installers from the links on the Synapse page, worked for her.
HTH
This is a long shot, but that exact error is also given if the Kinect USB and/or power supply simply becomes unplugged. Thought it was worth mentioning as it is not obvious from the error message itself and it may help someone out if they kicked their power supply and started searching for the above exception :)