- 积分
- 630
- 明经币
- 个
- 注册时间
- 2004-7-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
原有一段代码如下:(适用于AutoCAD R14)
void CInputHoleData::InitDataBase() { /* Initialize Asi application */ if (asi_initasi (&appl) == kAsiBad) { ads_printf ("\nCannot initialize ASI"); }
do_connect();
} void CInputHoleData::do_connect(void) { static char buffer[128]; // Temporary buffer
if (session == 0) { if (asi_constr_session (&session, appl) == kAsiBad) { ads_printf ("\nUnable to construct session"); return; } } // Disconnect if already connection exists if (isConnected == kAsiTrue) { if (asi_disconnect (session) == kAsiBad) { ads_printf ("\nCan't terminate SQL session. Fix problems and try again ..."); return; } isConnected = kAsiFalse; } for (;;) { if ( asi_connect (session, "DB3", "" , "") == kAsiGood ) { /* display driver information */ asi_dbms (session, buffer, 128); ads_printf ("\nDBMS: %s", buffer);
asi_sqlobject (session, buffer, 128); ads_printf ("\nSQL Object Id: %s", buffer);
asi_message (session, buffer, 128); ads_printf ("\nMessage: %s", buffer); isConnected = kAsiTrue; ads_printf("\n--------加载数据请稍等!\n"); break; } } return ; }
但现在我要把它移植到AUTOCAD2004,我已被次段代码困扰一个星期了,急得要命!
现在向斑竹及各位大侠求助!
多谢! 小贺
致敬! |
|