数据库连接问题

本人在linux下装了一个unixodbc,使用DataManager已经能正确连接到2000下的sql server7.0,同时用isql -v MyServer70 sa ,也能连上数据库证明我的数据源应该是正确的,可是我在用程序调用这个数据源时,运行却老提示这样的错误:
[SAP AG][LIBSQLOD SO]data source name not found and no default driver specified,程序编译已经能通过为什么会找不到数据源呢?
本人把代码贴出来,请各位帮忙看看,多谢!:
#include ....
void OD_ListDSN();
SQLHSTMT V_OD_hstmt;
SQLHENV V_OD_Env;
long V_OD_erg;
SQLHDBC V_OD_hdbc;
char V_OD_stat[10];
SQLINTEGER V_OD_err,V_OD_rowanz,V_OD_id;
SQLSMALLINT V_OD_mlen,V_OD_colanz;
char V_OD_msg[200],V_OD_buffer[200];

int main(int argc,char *argv[])
{
V_OD_erg=SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&V_OD_Env);
if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO)){
printf("Error AllocHandle\n");
exit(0);
}
V_OD_erg=SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO)){
printf("Error SetEnv\n");
SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
exit(0);
}
OD_ListDSN();
// 2. allocate connection handle, set timeout
V_OD_erg = SQLAllocHandle(SQL_HANDLE_DBC, V_OD_Env, &V_OD_hdbc);
if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO)){
printf("Error AllocHDB %d\n",V_OD_erg);
SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
exit(0);
}
SQLSetConnectAttr(V_OD_hdbc, SQL_LOGIN_TIMEOUT, (SQLPOINTER *)5, 0);
// 3. Connect to the datasource "MyServer70"
V_OD_erg = SQLConnect(V_OD_hdbc, (SQLCHAR*) "MyServer70", SQL_NTS,
(SQLCHAR*) "root", SQL_NTS,
(SQLCHAR*) " ", SQL_NTS);
if ((V_OD_erg != SQL_SUCCESS) && (V_OD_erg != SQL_SUCCESS_WITH_INFO))
{
printf("Error SQLConnect %d\n",V_OD_erg);
SQLGetDiagRec(SQL_HANDLE_DBC, V_OD_hdbc,1,
V_OD_stat, &V_OD_err,V_OD_msg,100,&V_OD_mlen);
printf("%s (%d)\n",V_OD_msg,V_OD_err);
SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
exit(0);
}
printf("connected!");
}
void OD_ListDSN(void)
{
char l_dsn[100],l_desc[100];
short int l_len1,l_len2,l_next;

l_next=SQL_FETCH_FIRST;
while( SQLDataSources(V_OD_Env,l_next,l_dsn, sizeof(l_dsn),
&l_len1, l_desc, sizeof(l_desc), &l_len2) == SQL_SUCCESS)
{
printf("Server=(%s) Beschreibung=(%s)\n",l_dsn,l_desc);
l_next=SQL_FETCH_NEXT;
}
}