Home > Software engineering >  Vc database programming
Vc database programming

Time:10-06

 bstr_t strConnect=(" driver={SQL Server}; Server=(local) \ \ sqlexpress; The DATABASE=movie order system; UID=sa; The PWD=123 "); 
//_bstr_t strConnect="Provider=SQLOLEDB; The Database=CAP; uid=sa; The PWD=123; ";
cout <"1" & lt; _CommandPtr m_pCommand;
Mand m_pCommand. CreateInstance (" ADODB.Com ");
M_pCommand - & gt; ActiveConnection=m_pConnection;//the key sentence, will establish the connection assigned to it

Can I ask what XiaWen cout sentence leads to debug the error

CodePudding user response:

Mand m_pCommand. CreateInstance (" ADODB.Com ");
If you create failure, behind will be error

CodePudding user response:

CreateInstance () function call failed?
  • Related