4/23/2019 Re: How to link SQL server to Labview with Database Toolkit - NI Community - National Instruments
Solution Accepted by topic author holyna (/t5/user/viewprofilepage/user-id/128091) 08-27-2015 04:09 PM
(/t5/LabVIEW/How-to-link-SQL-server-to-Labview-with-Database-Toolkit/m-p/968215#M434063) Re: How to link SQL server to Labview with
Database Toolkit (/t5/LabVIEW/How-to-link-SQL-server-to-Labview-with-Database-Toolkit/m-p/968215#M434063)
smercurio_fc (/t5/user/viewprofilepage/user-id/33243) KNIGHT OF NI
08-19-2009 04:25 PM
You cannot create a database in SQL Server using the ODBC control panel or a UDL. You have to create a database using the SQL Server
tools. (Actually, you can use SQL statements to create a database, which is all that really happens using the SQL Server tools. However, I'm
not sure if the Database Toolkit has the VIs required to send those kinds of SQL statements.). Once you've created the database you can
create tables using the SQL Server tools, or you can use the Database Toolkit VIs.
Are you trying to run SQL Server on your computer? SQL Server is typically run on a server. Are you trying to use SQL Server Express?
Assuming you have SQL Server running, and a database created, then these are the steps required to create a UDL to connect to it:
1. In Windows Explorer create a new text file, and rename the text file so that it has a .udl extension (like that PDF said).
2. Double-click on this UDL file.
3. Change to the "Provider" tab.
4. Select "Microsoft OLE DB Provider for SQL Server".
5. Click the "Next >>" button. This changes you to the "Connection" tab.
6. From the dropdown menu select your SQL Server. If it's not listed, try clicking the "Refresh" button. If this does not populate the list, then
you will need to enter it manually.
7. In the "#2" section specify the authentication method and the credentials, if required, in order to log into SQL Server.
8. In the "#3" section specify the database that will be used, which is the one you previously created using the SQL Server tools. DO NOT
SELECT THE MASTER DATABASE. If you do, you'll completely screw up your installation of SQL Server.
9. Click "Test Connection" to verify that you can connect to SQL Server.
(HTTPS://FORUMS.NI.COM/T5/FORUMS/FORUMTOPICPRINTPAGE.KUDOSBUTTONV2.KUDOENTITY:KUDOENTITY/KUDOSABLE-GID/968215?T:AC=BOARD-ID/170/M
(30,800 Views)
REPLY (/T5/FORUMS/REPLYPAGE/BOARD-ID/170/MESSAGE-ID/434063)
(https://www.lithium.com/powered-by-lithium)
https://forums.ni.com/t5/forums/forumtopicprintpage/board-id/170/message-id/434063/print-single-message/true/page/1?profile.language=en 1/1