今天第一次尝试着用ADO连接数据库,结果代码编译通过,但Link出错:
//////////
Linking...
   Creating library ReleaseUMinDependency/Qestion_info.lib and object ReleaseUMinDependency/Qestion_info.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/Qestion_info.dll : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.//////////错误指向的代码:
//////////////////
//建立Connection对象
if(FAILED(pConn.CreateInstance(_uuidof(Connection))))                     
{
*x_QInfo=::SysAllocString(L"N#Couldn't create connection component!");      
return S_OK;
}
//打开Connection对象
if(FAILED(pConn->Open("Provider=MSDASQL.1,Password=******;Persist Security Info=True;User ID=SA;DATA Source=QestionInfo_DATA;Initail Catalog=QestionInfo_DATA","","",-1)))                 
{
*x_QInfo=::SysAllocString(L"N#Couldn't open connection!");  
return S_OK;
}
//////////////////////请问高手该如何解决?