Hi All, Long-time lurker, first-time poster here.
As the title (hopefully) implies, I have an issue connecting to a database I've created.
The problems started this week after coming back to look at the project after ~3 months. I know I had to repair my Office 365 installation last week and I'm wondering if that could be the cause but other than that I'm at a complete loose end.
Microsoft support say it's a LabVIEW issue, NI support say it's an MSDN issue. The official NI forum, after looking at similar posts, was even less helpful. So I thought I'd come and see if the nice guys at LAVA had experienced a similar issue.
I'm aware that the error code is a generic one and has multiple causes but I am simply writing a "SELECT [column] FROM [table];" statement to an 'Execute Query' vi. The error returned from my sanity checking vi is:
(Code -2147217900) NI_Database_API.lvlib:Conn Execute.vi->Untitled 1<ERR>ADO Error: 0x80040E14
Exception occured in Microsoft Access Database Engine: in query expression '[UserID]'. in NI_Database_API.lvlib:Conn Execute.vi->Untitled 1
The connection string returned is (without line breaks):
Data Source=T:\PROJECTS\02-ACTIVE\119888 RF Power upgrade\Database\RFPU.accdb;
Mode=Share Deny None;
Jet OLEDB:System database="";
Jet OLEDB:Registry Path="";
Jet OLEDB:Database Password="";
Jet OLEDB:Engine Type=6;
Jet OLEDB:Database Locking Mode=1;
Jet OLEDB:Global Partial Bulk Ops=2;
Jet OLEDB:Global Bulk Transactions=1;
Jet OLEDB:New Database Password="";
Jet OLEDB:Create System Database=False;
Jet OLEDB:Encrypt Database=False;
Jet OLEDB:Don't Copy Locale on Compact=False;
Jet OLEDB:Compact Without Replica Repair=False;
Jet OLEDB:Support Complex Data=False;
Jet OLEDB:Bypass UserInfo Validation=False;
The BD for my sanity check looks like this:
I'm using LabVIEW 2016 32-bit on a W7 Dell Ultrabook with Access2013 as part of our Office 365 installation. BTW the query executes fine in Access2013. Is that enough info?
Hi all. I recently got the Database Connectivity Toolkit (DBCT) on LabVIEW 2016 and I'm trying to insert multiple rows into a database.
Using a sine signal input I attempted to insert 50 rows in one iteration, but every method I tried returned 50 values in one row. Using the end of line constant and array to spreadsheet string, returned what looked like 50 rows, but when I queried "SELECT COUNT(*) FROM.." the no of rows was equal to the number of iterations.
On another forum post, someone suggested it is not possible to insert multiple rows using the DBCT. Can anyone confirm this?
I have written some code which allows me to insert 3 rows in one iteration, under a single connection. However, this method is very tedious and wouldn't work for large amounts of data.
Can anyone think of a better way to do this?
Thanks in advance,
My question relates to retrieving decimated data from the database.
Given the case where I have 1M X and 1M Y steps (a total of 1000000M data points per channel) how do I efficiently get a decimated overview of the data?
I can produce the correct output data be using
Select X,Y,Z,Float1 from P
GROUP BY Y/1000
This will output only 1x1000 data instead of 1x1000000 datapoints, one dimension quickly decimated Problem is that is iterates over all data (and this takes quite some time). If I do a different query to retrieve only 1000 normal points, it executes in under 100ms.
I would like to use a CTE to do this, thinking that I could address directly the 1000 elements I am looking for.
WITH RECURSIVE cnt(x) AS ( SELECT 0 UNION ALL SELECT x+1000 FROM cnt LIMIT 1000 )WHAT GOES HERE?; So if I can create a cte with column x containing my Y Indices then how do I get from this to directly accessing
Float1 FROM P WHERE X=0 AND Y=cte.x
SELECT Float1 from P WHERE X IN (SELECT x FROM cnt) AND Y=0 AND Z=0
Using the "IN" statement is apparently quite inefficient (and seems to return wrong values). Any ideas?
In addition, accessing even a small number of data points from within an 8GB SQL File (indexed!) is taking upwards ot 30 seconds to execute at the moment. With 1.5GB files it seemed to be in the region of a few milliseconds. Does SQLite have a problem with files above a certain size?
Submitted: 01 Mar 2014
Category: Database & File IO
LabVIEW Version: 2009License Type: Other (included with download)
This is a package containing LabVIEW bindings to the client library of the PostgreSQL database server (libpq).
The DLL version 9.3.2 and its dependencies are included in the package. This DLLs are taken out of a binary distribution from the Postgres-Website and are thread-safe (e.g. the call to PQisthreadsafe() returns 1). As of the moment the DLLs are 32bit only.
The VIs are saved in LabVIEW 2009.
So this package works out of the box if you have a 32bit LabVIEW 2009 or higher on any supported Windows operating system.
Because this obviously is a derived work from PostgreSQL it is licensed by the PostgreSQL license.
A few words regarding the documentation: This package is meant for developers who know how to use the libpq. You have to read and understand the excellent documentation for the library. Nonetheless all VIs contain extracts of that documentation as their help text.
What's coming next?
- adding support for 64bit
- adding support for Linux (anybody out there to volunteer for testing?)
- adding support for MAC (anybody out there to volunteer for testing?)
Click here to download this file