08-13-2014 08:53 AM
I am having an issue connecting to a "linked server" in SQL.
I can use the UDL file to connect to a server, Server A, and read/query all the tables I want from that database/server. The issue I have is that I am unable to see the "linked server"'s (Server B) tables (or database) in the UDL file, so I cannot query the tables.
Server B is actually at a vendors side, and replicates the data over to our server once a day. In Studio Manager, I am able to query the linked server database and tables just fine. But I cannot seem to find where to make the database from the linked server availible in the UDL file. Maybe I do not need to use the UDL, but that is the way I have done it so far.
I have tried to use the "DB Tools Select Data.vi", and the SELECT statement was "SELECT * FROM SERVERB.DATABASE.dBo.TABLE, but it does not return anything. I was using the UDL file to connect to the ServerA, which makes me select a default database, I am not sure if this is part of the issue.
08-14-2014 03:11 PM
Hello Kenny,
I think there are a few things you can try to solve this issue. First, check the UDL file contents. If it is making you connect to a default database, perhaps you can modify the UDL to make this default the 'B' database you are trying to access.
Also, look into how exactly you are connecting to each server. In Management Studio, are they both using UDL? Is it the same UDL file or separate files? I think the best thing to do would be to have two separate UDL files, one for each server. Then in your LabVIEW application, you can connect to each one and query data as needed. Then you can use one to access server B directly, without first connecting to A. You may have to contact the vendor to obtain a UDL file for this server, or at least the information necessary to create one.
If this doesn't work, it may have to do with the data you are trying to retrieve, is it a binary or bitmap file?
Hope that this information helps.
08-16-2014 03:47 AM
08-19-2014 09:08 AM
No data is returned, no error is reported either.
I have been connecting using the UDL file to Server A, but I cannot figure out how to get to the linked server through the UDl file.
08-19-2014 11:15 AM
08-19-2014 11:17 AM