Does MSOLEDBSQL support multiple SQL Statement run at one time?
i.e. if bstrSQL = "'USE myDB; CREATE TABLE dbo.Connections([ConnectionID] nvarchar (64) NOT NULL ,[Serial] int NULL ,[RestartStr] nvarchar (255) NULL ,[ProjectName] nvarchar (16) NOT NULL ,[Created] [datetime] NOT NULL DEFAULT (getdate()),[SampleId] nvarchar (64) NULL)"", there is are no errors if I had already created Table "Connections".
C++ code slice:
try
{
m_pADODBErrors = NULL;
m_lErrorIndex = 0;
TCHAR connStr[1024];
_tcscpy(connStr, _T("Provider=MSOLEDBSQL;Server="));
_tcscat(connStr, bstrDBServer);
_tcscat(connStr, _T(";dsn=;Trusted_Connection=yes;"));
// increate default 15 seconds timeout to 2 minutes
pConnection->ConnectionTimeout = 120;
pConnection->Open(connStr, _T(""), _T(""), ADODB::adConnectUnspecified);
pConnection->Execute(bstrSQL, NULL, ADODB::adCmdText);
}
catch (...)
{