Redshift ODBC 64-bit driver error - amazon-web-services

My system has both 32-bit and 64-bit Redshift ODBC drivers installed. It shows up in the ODBC Data Sources under System DSN tab. However, only 32-bit driver shows up in the Drivers tab.
Also, when I attempt to make a Redshift connection by specifying 64-bit in the connection string Driver={Amazon Redshift (x64)}, I get this error: "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Only the following in the connection string seems to work Driver={Amazon Redshift (x86)}.
I tried
Re-installing and repairing 64-bit driver.
Removing 32-bit driver from the System DSN tab
But none seemed to work.
Am I missing something?

We had the same problem using the Amazon Redshift driver in our ASP.NET application at our company.
If you're also using the Amazon Redshift driver in an ASP.NET application, I hope what we figured out (the hard way) might help you.
The solution to the problem is to use the 64-bit driver if you're running the application with the 64-bit IIS, and to use the 32-bit driver if you're using the 32-bit IIS. The thing that caught us off guard is that even on a 64-bit machine running 64-bit Visual Studio, the default IIS is 32-bit, not 64-bit. (https://www.jc-tech.info/2016/09/24/running-32-bit-or-64-bit-iis-express/)
This explains why only the 32-bit driver is found by your application. Regarding why the 64-bit driver does not appear in the Drivers tab of the ODBC Data Sources Manager, there are actually 2 versions of the ODBC manager: a 32-bit version, and a 64-bit version. The 64-bit driver will only show up in the 64-bit ODBC manager.
When debugging your application, if you want to make sure that Visual Studio is using the 64-bit IIS, go to Tools>Options>Projects and Solutions>Web Projects, and tick the "Use the 64 bit version of IIS Express" checkbox.
Similarly, when you deploy your application, make sure that your driver version (32 or 64 bit) matches the version of your production environment.

Had same problem,
I kept only 32 bit driver and uninstalled 64-bit and I put
Driver={Amazon Redshift (x86)}.
It worked fine.
More info can be found from below link.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/480db31c-b583-4c22-a7eb-bc37ad3a3e6d/data-source-name-not-found-and-no-default-driver-specified-error-in-report-builder-when-adding-an?forum=sqlreportingservices

If you are building a .NET application check the project properties for Build option to target x64 platform instead of using Any CPU option to target all

Related

Can you target x86 with mysql server and connector c++

I'm trying to use MySQL with a visual studio using SFML. This library needs to be used with x86 as the active platform solution. However, the MySQL server and connector c++ uses an x64 architecture and doesn't work when the active platform solution is set to x86.
Is there a way to get the server and connector to work with x86? Any help is appreciated.

How to install custom SNMP extension agent on Windows 10?

I have developed a custom snmp extension agent to work in conjunction with Windows Snmp service. I have implemented in C++ using the interface provided by snmp.h from Microsoft and I am creating a 64 bit dll to be used as extension agent.
To install this dll as extension agent I have added a registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents as:
MyAgent REG_SZ SOFTWARE\MyAgent\CurrentVersion
And under HKEY_LOCAL_MACHINE\SOFTWARE\MyAgent\CurrentVersion, I have created another registry specifying the path of the dll as:
Pathname REG_EXPAND_SZ C:\Program Files\testing\MyAgent.dll
When I did this in the system event logs I keep getting that the The SNMP Service is ignoring extension agent dll C:\Program Files\testing\MyAgent.dll because it is missing or misconfigured.
The agent is a trapless agent. It exposes the SnmpExtensionInit and the SnmpExtensionQuery function from snmp.h. I don't know what is messed up. Do I need a 32 bit dll? All of the sources on internet are very old and refer to Windows NT. I need to configure it on newer operating systems like Windows 10 and Windows server 2016. Any suggestions would help.
Also there are similar questions on SO for same error but all of them are related to migration of a 32 bit dll. I am starting with 64 bit.
because the SNMP process is still 32-bit the key needs to be
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6232Node\MyAgent\CurrentVersion
but I am finding the SnmpExtensionInit is not called

How to fix "Please ensure that target device has developer mode enabled" error in Hololens Emulator

The problem that I have is that after I have built my Unity project using Microsoft's Mixed Reality Toolkit and the Windows SDK 10.0.18362.0 I try to deploy it using the Hololens 2 emulator (version: 10.0.18362.1019). The result is that even though the emulator opens, my Unity application does not get deployed and the following error is being shown in Visual Studio's error list:
Please ensure that target device has developer mode enabled. Could not
obtain a developer license on 192.168.9.57 due to error 80004005
I found several articles online that had the same problem like me, and they either referred to resetting the HoloLens device (which I do not need to do, since it is an emulator) or enabling the Developer Mode on the host machine (in my case a fully updated Windows 10 Enterprise Edition computer), which I already have. Nevertheless the error persists.
I just hope that there will be a way to get rid of this error and manage to deploy my Unity application onto the HoloLens emulator.
It seems that the solution is very simple. If you actually run Visual Studio as an Administrator the application is successfully deployed onto the emulator.

32 bit ODBC Driver to connect to a 64 bit Database

In order to connect to a 64 bit Database (Oracle / DB2 / Postgresql/ SQL Server) from a 32 bit Software via ODBC, do I need the 32 bit Database client or just the 32 bit ODBC Driver would suffice.
As an example from Oracle, when I am installing Oracle Server, the 32 bit ODBC Administrator, does not necessarily have an entry for Oracle as the 32 bit ODBC Driver does not exist. In order to connect, I had to install the 32 bit Oracle Client, after which I can see an ODBC entry.
So my question is, in order to connect to a 64 bit database from a 32 bit application, do I need the 32 bit database client (thin/full) or just there exist a 32 bit ODBC driver which can be installed to establish a connection.
Which client you use is dependent on the architecture of the client machine you are using, not the server.
IIRC, with Oracle you need to install the client AND the ODBC driver. The client actually handles the connection to the database while the ODBC layer translates ODBC-speak to something the client understands.
I assume other platforms are similar although it is possible some databases supply an unified client installer that can install both the client and the ODBC driver.
When using ODBC, it is important to use the ODBC architecture that matches your client application. For example, If you are using x86 Access you would need the 32 bit ODBC driver and client.
When I setup a SQL Linked Server to Oracle, I installed:
Net Configuration Assistant
Net Manager
ODBC Driver
OLE Driver
The driver architecture should match the machine architecture. In my case it was 64bit Windows Server, so I used the 64-bit driver (win64_11gR2_client.zip).
I then ran the Net Config. Assistant and setup the oracle config (host/port/user/pass/service name). Make sure you pass a connection test here. This will configure your tnsnames.ora file (%path%\product\11.2.0\client_1\network\admin\tnsnames.ora)
If you can't connect, look into the sqlnet.ora file. I had to alter mine to read SQLNET.AUTHENTICATION_SERVICES= (NONE) before I could connect successfully.
I then ran ODBC to setup a System DSN using the same name setup in the Net Config. Assistant.
Following is valid for Oracle, I don't know if it all applies also for other RDBMS.
Database server and client are independent from each other, i.e. you can connect with an 32-bit Oracle Client to a 64-bit Oracle database server.
However the architecture of ODBC-Driver and Oracle Client have to match, i.e. a 32-bit ODBC driver works only with an 32-bit Oracle Client, a 64-bit ODBC driver needs the 64-bit Oracle Client. This restriction applies also for other providers like OLE DB or ODP.
A 64-bit Oracle client requires a 64-bit Windows, of course. Installing a 32-bit Oracle client on 64-bit Windows is no problem.
It is also possible to have both 32-bit and 64-bit Oracle client (and thus both architectures of ODBC drivers) installed on the same machine. However, you have to do a few "tricks" to make them both working seamless.

Connect to a wireless network programmatically

I'm trying to write an application that connects to my company's wireless network automatically on windows XP.
I've found the Wireless LAN API but it requires me to have some hotfix installed on the machine, and you need to have sp2 or higher(There are machines with SP1, and I'm required to support any XP machine).
I've tried to find some samples about Wireless Zero Configuration on MSDN but with no luck, only samples I've found are for WinCE, I think Microsoft stopped supporting it. In addition I couldn't find where to download the dll and header file for working with the WZC.
There must be a way to do it and work on any service pack because I've found Zwlancfg by ENGL
Point out that any change you'll have to introduce to these old XP machines will be similar in magnitude to the SP2 update, except that (1) you don't have the insight into the network stack that Microsoft has, (2) you don't have the experience in Windows development that Microsoft collectively has and (3) you don't have the testing resources (including beta testers) that Microsoft has. So your change will be more risky and less stable than the SP2 update.
Couldn't you just setup the wireless password and tell XP to auto-join when it sees the network?
Maybe I'm missing something but it happens automatically, so I don't see why you need to code an app to do this.
I would encourage you to advocate for upgrading those XP machines at least to Service Pack 2 as it was a major upgrade in terms of functionality and security. It's also been at least 5 years since it was rolled out so I can't imagine you'd have compatibility issues with 3rd party software.
That being said.
Wireless for XP was seriously reworked with Service Pack 2 and the Wireless Network Policy was created that allows you to push out policy to all machines on your network via the Group Policy MMC.
You should try native wifi api but it will work with XP SP2
There is one WLANCONNECT() methos try that one
with that you will be able to connect to network with your program