各位高手:
    在VC下,linux下,连接数据库没有问题,但在Visual Studio 2005下,连接数据库是出错,请各位高手看看如何解决?
    解决立即散分!
    以下是程序:
if(m_pEnvironment == NULL)
m_pEnvironment = Environment::createEnvironment((Environment::Mode)(Environment::THREADED_MUTEXED|Environment::OBJECT));
m_pConnection  = m_pEnvironment->createConnection (m_sUserName, m_sPassword, m_sDatabaseName);连接时字符串就已经没值了,所以m_pConnection  = m_pEnvironment->createConnection (m_sUserName, m_sPassword, m_sDatabaseName);建立连接不成功.ORACLE 错误代码是  ORA-24960立等!!!!

解决方案 »

  1.   


    ORA-24960: the attribute string is greater than the maximum allowable length of number 
    Cause: The user attempted to pass an attribute that is too long
     
    Action: Shorten the specified attribute and retry the operation. 1. string 过长?
    2. 相应驱动是否正确?
    ------------------------------------------------------------------------------
    Blog: http://blog.csdn.net/tianlesoftware
    网上资源: http://tianlesoftware.download.csdn.net
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
    Q Q 群:62697716 
      

  2.   

    1. string 过长? string 不长,是合法的.
    2. 相应驱动是否正确?驱动应该正常.初步判断应该是visual studio 2005中的common language runtime suport在字符的转换时出了问题,因为在VC中或其它的环境下,完全没有问题,但如果是这种问题的话,如何解决?
    能否指点一下?
      

  3.   

    环境的问题吧, 有人说把VC6换成VC7就能解决问题。