08-25-2020 07:36 AM
While trying to connect to the SQL Server 2012 with the "Database connection.vi" I am facing two problems.
With the assistant when selecting the connection method 'Prombt' and then 'MS OLE DB Provider for SQL Server', the test is succesful but when exit it with 'ok' afterwards, this error occurs:
when using it with a string directly (ODBC method), another error occurs:
connection string from: https://www.connectionstrings.com/sql-server-2012/
thanks in advance for any help
Solved! Go to Solution.
08-25-2020 07:45 AM
Hi,
in my experience this is happen when you run 64 bit assistent and 32 bit labview version or viceversa.
Maybe assistent and LabVIEW are running both on same bitness but you have to be sure.
All the best
Golzione
08-25-2020 07:54 AM
Hi Golzioge
Thank you for the fast reply.
Indeed, this could be a problem. We are running LV 32 Bit.
What to do in the second example where no assistant is active - as far as I understand it?
all the best, Mischl
08-25-2020 01:48 PM
Hi!
There is still some kind of driver involved.
I'm connecting to MS SQL server 12 via
Provider=SQLOLEDB.1;
SQLOLEDB may be the 64Bit driver and SQLOLEDB.1 the 32Bit driver. I don't know.
To get this connection string, create an empty text file and call it x.udl. You can double-click it, but you will get the 64Bit editor.
Use this to get the 32Bit editor when you plan to use this on LabVIEW 32Bit:
C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll", OpenDSLFile D:\x.udl
With that GUI, you should be able to setup and test the connection to the server. Once done, you can copy the string out of the file - or wire the path to the file to the DB connect VI.
08-27-2020 12:24 AM
Hi Seb
Thank you a lot for the explanation and therefore the clarification.
Provider=SQLOLEDB.1;
Did the trick with 'ODBC System DSN'!
have a good time