02-25-2019 03:49 PM
I am getting different results from the ODBC connection and UDL connection.
The VI runs the same query, only the connection is different. However, the ODBC connection sucessfully ran the query script and returned the result; UDL connection, did not return anything, no any error message either.
I tried to google if there is any difference between these two connections, but did not get anywhere. Could it be the query itself? Not likely either, since the ODBC connection does run correctly.
I am so puzzled. What's happening here?
02-26-2019 04:43 PM
Hello MengHuiHanTang,
From what I can gather, an ODBC uses a Data Source Name (DSN) connection while OLE DB uses a Universal Data Link (UDL) connection. The difference between the two connections are the DSN contains information about a database and the UDL is a universal file that links to a database. For more information check out Difference Between Types of DSN and a UDL.
Your UDL file may have been created incorrectly, you can check out Creating a Microsoft Data Link file (UDL) for Connecting to a Database in LabVIEW to review over the process.
02-27-2019 10:22 AM
Thanks for the reply.
I don't think the UDL file was not correctly set up. If that was the case, I would have seen some type of error now. But I did not.
Following the other link, I tried the 'File DSN' to connect to the database and run the query. It worked. A .dsn file is very similar to a .udl file, and it does not require any configuration in the ODBC window. So I can replace the udl with a dsn now.
Why the udl connection does not work is still a mystery to me though.