03-03-2006 01:04 PM
03-03-2006 02:46 PM
03-03-2006 04:05 PM
03-05-2006 04:08 AM
I've written a DLL myself to interact through ODBC with a number of databases and I can't see this behaviour in any LabVIEW version from 6.0 up to and including 7.1. What API do you use in the DLL to contact MSDE? If it is ODBC are you using SQLDriverConnect or SQLConnect?
@birddog wrote:
We're actually using our own dll that we wrote to integrate some existing code into LabView. When the code that contains the database calls is executed by its self, no problems arise, even if Labview is running. When the exact same code is called from the call library function, no more dialogue boxes in LabView.
03-06-2006 10:43 AM
We don't use SQLDriverConnect or SQLConnect. We depend on whatever the class CDatabase uses. This example just opens and closes the connection without doing any specific query, but that is enough to break things.
//Exported function
SOME_EXPORT_DEFINE long BECEXtract( /* some params */ )
{
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
//BEC01 is a PC name
CString strConnect = "Driver={SQL Server};Server=BEC01;Database=BECLocal;Trusted_Connection=yes;";
CDatabase db;
BOOL bResult = db.OpenEx( strConnect, CDatabase::openReadOnly|CDatabase::noOdbcDialog );
db.Close();
return bResult;
}