返回首页

我连接到一个Access 2010数据库。问题是我的查询没有返回一个数字。任何帮助表示赞赏。谢谢。


/* Connect to the 'Fileber.accdb' database */

rc = SQLDriverConnect(hDbc, NULL, szDSN,  _countof(szDSN), 

szConnStrOut, 255, &iConnStrLength2Ptr, SQL_DRIVER_NOPROMPT);

if (SQL_SUCCEEDED(rc)) 

	{

	printf("%s: Successfully connected to database. Data source name: \n  %s\n",					DAM, szConnStrOut);

	const char* TOTL;

	TOTL = "SELECT COUNT(*) FROM tblClients";

	printf("%s: Total of Clients %s.\n", TOTL);

		}

		else

		{

		printf("%s: Couldn't connect to %s.\n", DAM, szDSN);

		}
:7766180 |会员

回答

评论会员: 时间:2