Users in my office who have been upgraded to Windows 10 (build 1909) are suddenly getting the message "[Microsoft][ODBC Drive Manager] Invalid cursor state (#0)" whenever they run a pass through query in Microsoft Access. It doesn't matter how complicated the Pass Through query is, they all crash. We use SQL Server on our back-end. I have tried updating the ODBC drivers on our users' machines to the most recent version, but this doesn't solve the problem.
It is very frustrating because I can open tables linked to our SQL Server with no problem. I can write an equivalent query in Access and it will run. I even installed SQL Management Studio on one user's machine, and I could run the query fine there, I just cannot get the Pass Through to run. We are using 32 bit Access from Office 365 with the most recent updates.
Any help would be appreciated.
Related
We have a MS Access 2010 app, using SQL Server 2008 R2 as its database. All workstations were running on Windows 7 with no problems.
Our customer started to upgrade the workstations to Windows 10, and now we see connection to the server drops at a random occasions. Not related to any specific action, query, report or form.
The application is using ODBC connection to access the tables.
When this happens, all connections to all tables are dropped, and the app is unusable.
To resolve this, we need to restart the application and everything is working fine again, until the next time.
We opened up a table when this error occurs and see all the records showing #Name as the data.
Please help
Tested the network connection - no problems or errors
Upgraded SQL Server Service Pack to the latest (thought it might related to TLS version)
In our company we have to support a large legacy system built on Microsoft Access 2010 as frontend and SQL Server 2008 R2 as backend. The backend SQL server runs on Windows Server 2008 R2. Currently our users works on Terminal Server sessions on a Windows Server 2008 R2. A couple of days ago we started to test Windows Server 2019 and Notebooks with the latest version of Windows 10. We recognized a big performance difference while executing the same Access databases on the different environments.
For instance the creation of a report takes 27 seconds (new environment) instead of 7 seconds (old environment). The database.accdb is identical, the backend is identical (still Windows 2008 R2 Server with SQL Server 2008 R2 and SP2), only the execution environment (Windows) changed.
Does anyone of you have an idea how to explain this?
In Access 2010 the SQL server tables are linked using System-DSN data sources. On the old environment ODBC is used (Driver: SQL Server, Version: 6.01.7601.17514).
On the new environment I tested the following drivers:
ODBC Driver 11 for SQL Server (2014.120.5543.11)
ODBC Driver 17 for SQL Server (2017.173.01.01)
SQL Server (10.00.17763.01)
SQL Server Native Client 10.0 (2009.100.4000.00)
SQL Server Native Client 11.0 (2011.110.5058.00)
I created a new System-DSN using the different drivers and updated the linked tables in Access. But in any case the performance is still bad. I also tested the latest version of Access which comes with Office 2019, but again it is slow.
Sounds like your terminal sessions are getting throttled. Despite the fact that you have a SQL Server back end, Access is still doing a fair bit of thunking with the result sets, so any resource throttling differences between your Server 2008 and Server 2019 policies could be choking Access in the new server.
I think your answer is going to be found in Windows System Resource Manager. The page says it's not being maintained, but following the "Recommended Version" link leads to a generic Server 2019 page. Here's another article about how WSRM might be throttling sessions: Using WSRM to control RDS Dynamic Fair Share Scheduling.
Compare the Weighted_Remote_Sessions policy in 2008 and 2019 servers. There's either been a change to the default settings or behavior or the 2008 server policy was modified in the past to get to the current performance level.
Ok, a number of things to check.
First thing to check:
Launch the ODBC manager and check if SQL log tracing is on. I don’t know why, but I see sql logging turned on.
You NEED to be 100% sure it is turned off.
You MUST launch the ODBC manager from the command line or start menu, since the one in the control panel is for the x64 bit version, and you are using Access x32 (I assume).
So launch this version:
c:\Windows\SysWOW64\odbcad32.exe
So VERY important to launch the x32. It is assumed you are using a FILE dsn. So check these two settings:
(Make sure they are un-checked).
Next up?
Link access using the IP address of the sql server.
So, place of say:
myServer\SQLEXPRESS
Use:
10.50.10.101\SQLEXPRESS
(Of course use the IP address of sql server, not the above “example” IP).
The above things are quite easy to check.
Still no performance fix?
Then disable the fire wall on your new Terminal server (I seen this REALLY cause havoc).
And, disable windows defender on the new TS server if running.
The above tips should fix your issues.
If above don’t work, then next would be to check the priority settings for the TS server (GUI over server).
However, I am betting the above checks should restore your performance.
Windows Server 2012
SQL Server 2014
Visual Studio 2013 Professional
SpiceWorks 7.5.00101 / SQLite 3.7.15.2
I am trying to connect SQL Server / Visual Studio to the SpiceWorks SQLite database so I can make a report showing the currently open tickets and who is assigned to them. This report is for the front desk receptionist so she can refer ticket creators that call in to the right person in IT. We don't want her to be able to see potentially sensitive data within the tickets.
I cannot get the connection to work!
I have tried both the 32 and 64 bit sqlite odbc drivers from here: http://www.ch-werner.de/sqliteodbc/
I use the C:\Windows\SysWOW64\odbcad32.exe to create the 32bit ODBC DSN using the SQLite3 Driver
I use the C:\Windows\System32\odbcad32.exe to create the 64bit ODBC DSN using the SQLite3 Driver
When I attempt to use the 32bit DSN to create either a Linked Server OR when used in a SQL Report (SSRS) as a DataSource I get this error:
The specified DSN contains an architecture mismatch between the Driver and Application
Which is supposed to mean that I used the wrong odbcad32 to create it - but I didn't (I've recreated this damn thing several times)
When I attempt to use the 64bit DSN I get this error:
IM006[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
All I can find is a HotFix for this reported error
https://support.microsoft.com/en-us/help/822841/fix-setting-of-connection-attribute-fails-when-you-use-connection-pool
however when I tried to instal the hotfixes they error saying they cannot determine the version of Data tools.
I have tried this on a Windows Server 2008 where the SpiceWorks software/database is installed, and from our Windows 2012 w/SQL Server 2014 using the fully qualified path "\ \spwrks\c$\Program Files (x86)\Spiceworks\db\spiceworks_prod.db" and get the same results.
I have tried pointing to the production database and to a copy of the database.
I have tried to uninstall all of the SQLite drivers and start from scratch. When the 32bit one fails, I uninstall, reboot, and install the 64bit one and it fails.
A very weird part to this is if I create a Server Explorer > Data Connection inside of Visual Studio 2013 pointing to the 32bit DSN , I can see all of the tables, create and execute a query against it without any problems.
Once I publish (deploy) the SSRS report and try it from the browser I get the " The specified DSN contains an architecture mismatch between the Driver and Application" error inside the browser.
This is driving me nuts. Help!
I have tried following the instructions on these links:
https://community.spiceworks.com/how_to/128624-export-spiceworks-sqlite-data-to-ms-sql
https://community.spiceworks.com/how_to/2271-create-ms-sql-linked-server-to-the-spiceworks-sqlite-server
https://community.spiceworks.com/how_to/28362-view-the-spiceworks-database-and-create-sql-reports
https://community.spiceworks.com/topic/132253-how-do-i-generate-a-spiceworks-report-using-sql-server-2008-reporting-services
Just an update
I have made a SSIS Import job that first copies the existing SQLite database, so I don't mess with the production, then imports the two tables I need (tickets and users) into the 2014 SQL Server. Then, I want to run a report off of those tables.
It seemed to work when I ran the job inside of Visual Studio, but once I tried to schedule the job with SQL Agent it failed to connect to the ODBC. Which made me think of a permission problem since running it inside the SSIS works. I went back to the SpiceWorks folder and database and set permissions to Full Control for Everyone just to see, but it still doesn't want to connect.
As, I have been trying to get it to work; just an hour ago, my production and copied SpiceWorks database became corrupted - not sure if copying it made it happen or what. The whole thing is very... "finicky". I wasn't writing anything to it, just trying to connect and do 2 simple SELECT statements.
Luckily, I had backup copies of the SpiceWorks database and was able to restore it.
I've never had so much trouble just trying to get data from a database!
After assistance from Robert with Microsoft, the solution was to disable the Run64BitRuntime option under the Property Page for the SSIS Project (right-click on the Project, select Properties, then under Configuration Properties > Debugging, set Run64BitRuntime to False) , because the SQLite is 32bit.
More information can be found here:
http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
Greeting; I have a development virtual machine I use daily for my job. Today I had a Windows Updates KB3212646, KB3197868, KB3185330 install and request reboot. After rebooting, I started getting errors in applications that ran SQL Statements. I opened SSMS 2014 to test and was getting different errors on simple selects. Example, I got all three of these errors from running the simple select a few times in a row.
select * from MVXJDTA.MITMAS
--An error occurred while executing batch. Error message is: Internal connection fatal error. Error state: 18
--An error occurred while executing batch. Error message is: Index was outside the bounds of the array.
--An error occurred while executing batch. Error message is: Object reference not set to an instance of an object.
I'm running Windows 7 x64 SP1.
I have Visual Studio 2010, 2012, and 2013 installed.
I have SQL Server 2008 R2, 2012, 2014, and 2016 installed.
I have removed the updates after the failure and I still have the errors. The errors don't occur on SMALL select statements, only larger ones. (MITMAS has 171,252 rows, 224 columns) Not a massive table by any means, but not a simple one either. If I do select top 100 MMCONO, MMITNO from MVXJDTA.MITMAS I do not seem to get the error. I have tested in SSMS for 2012, 2014, 2016, and in Visual Studio 2013.
I have not had the problem to till today, I know several Windows Updates installed Tuesday, but I didn't have issues yesterday after that reboot. I have not installed or uninstalled any other software.
Any assistance is appreciated.
In response to the comment that is can't be happening with the query listed:
Sadly, I was unable to resolve this issue. I installed all available service packs for all products, and even reinstalled the three updates listed in the question. After 10 hours of trouble shooting, and knowing I had to work again today, I started the restore process from backup. I believe something was corrupted in the .Net framework or Native client, as no software using the SQL Native client could run any statement that returned more than a few rows.
I will snapshot the machine before any more Windows Updates are installed, and advise here if those updates cause the problem to reoccur.
Sorry I couldn't report a better solution.
Billy
I have a strange (but also common) problem with Crystal Reports.
DB is SQL Server 2014 Express (12.0.2000 or 12.0.2269)
Web app can connect to DB with no problems. Problem arises when user wants to run a report.
Now, I have few production sites. A Windows Server 2012 R2 cloud VM, couple of Windows Server 2008 R2 machines and one Windows 10 machine.
Reports run fine on windows server 2008 machines, but not on server 2012 R2 or win 10. There, I get dreaded database logon failed error. It even doesn't work on my development laptop (Win 10). I mean I can run reports from within Visual Studio, but not after I deploy them to IIS.
Reports themselves mostly use sql native client (SQLNCLI11) driver for connecting to db, some of them are using OLE DB (SQLOLEDB), but that doesn't seem to be the problem since I've tried both versions, and they both fail.
Now, I would think maybe there is some dll missing in my app, but that very same app deployed to win server 2008 works just fine. So I am thinking, it must be environmental. But what?
I am guessing that client drivers are somehow broken, or something is changed in newer versions of windows.
So, I am asking for some ideas, to point me in right direction, if somebody has any.
Here is error snippet:
[COMException (0x8004100f): Database logon failed.]
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) +0
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +644
[LogOnException: Database logon failed.]
CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) +263
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +1522
CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) +704
CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) +115
CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) +96
SYSTEM.Controllers.ReportController.GenerateReport(NameValueCollection Form, String how) in C:\SYSTEM\SYSTEM\Controllers\ReportController.cs:210
SYSTEM.Controllers.ReportController.Index() in C:\SYSTEM\SYSTEM\Controllers\ReportController.cs:467
lambda_method(Closure , ControllerBase , Object[] ) +90
UPDATE:
It seems to be due to Windows 10, but I haven't found a solution.
SAP says install .NET 3.5, because it's not installed by default in WIN 10, but even when I do, error persists.
You should install 13.0.15 version of CR, because it't the only one that supports WIN 10, but as I said, it doesn't work.
I've tested on three different WIN 10 machines, always the same result.
I've run into issues when using a OLE DB (ADO) data source type, along with a Native Client provider. When that Native Client isn't installed on the consuming user's computer, it asks for a database login, and it seems that no login will work. My solution was to use the OLE DB (ADO) data source with the OLEDB provider as well. You can see the provider by looking at the properties of the data source by right-clicking on it. The preferred provider in this case is SQLOLEDB, whereas the Native Client will be something like SQLNCLI11.
You must utilize SQL-Client 2005 or version 10 (I guess).
Crystal Reports is really problematic if using the most recent drivers.
Try to establish the connection using the client-driver of SQL 2005 - it will function...
If anyone is interested, let my just share the solution:
It wasn't crystal reports, nor Windows 10, it was me. My reports were built upon SQL Server 2008, which uses SQLNCL10, and SQLNCL11 is not backwards compatible with it, hence database logon error (which is not helpful at all, btw).
Just in case.