gem's profileWaiting…BlogLists Tools Help

Blog


    10/11/2009

    又蹉跎了2天…

     强仔说blog有堕落为技术文的危险倾向,好吧,那就添加点文学性的引言
     
    话说,Troubleshooting这种事情,就像便秘,令人极度痛苦又不得不缓慢而持续…
     
    ----------------我是废话与正文的分隔符----------------------------
     
    Keyword:ODBCResultSet、Data type、Crash
     
    代码:
     Dim con As New odbcConnection
     Dim qry As New odbcQuery
     Dim res As New odbcResultSet
     
    con.ConnectTo("ODBC数据源")
    Set qry.Connection=con
    Set res.Query=qry
    qry.Sql="SELECT * FROM TESTTABLE"
    Call res.execute
     
    问题:
    执行完以上代码之后,任何对res的操作,都会引起lotus的崩溃,RunOnServer的话就是Domino崩,Notes端直接运行的话,就是客户端崩
     
    原因:
    TESTTABLE中,含有nvarchar(max)字段,天杀的odbcResultSet不支持
     
    解决方法:
    相应字段改成text
     
    -----------------我是11.18修改的分割符-------------------
    进一步的测试结果表明,上述问题的真实原因是lotus不支持Unicode,所以该成varchar(max)就行
    为什么不用text呢?text的存储方式制约了效率,据说微软在sql server2008中,已经不支持该类型了
    同样一个存储过程和参数,text需要25秒,而varchar只要4秒

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://cletgem.spaces.live.com/blog/cns!DC2AFAB4BD907791!2642.trak
    Weblogs that reference this entry
    • None