zoukankan      html  css  js  c++  java
  • 数据库错误 总结

    1、mysql server has gone away

     数据库 长时间不连接,会自动断掉,重新打开数据库。或者设置 连接时延,默认为300秒

    2、在Navicat for mysql 的视图里面只能看到一部分数据

       这是设置的限制问题,只需要吧右下角的限制 取消就行啦

    3、在VC上格式 句子时候,不用带 分号;

    4、字符串时候 要带单引号

    for(i = 1 ; i <= 18; i++)
                    {
                        memset(buf, 0 , sizeof(buf));
                        sprintf(buf,"select id from assist_movie_info where name='%s'",MovieList[i].MoiveName);
                        if(CheckTableInfo(buf,1,1,"0000100000")== NULL)
                        {
                            memset(buf, 0 , sizeof(buf));
                            sprintf(buf, "insert into assist_movie_info(name,director,actor,type,area,rate,alias,releasedate,review,comment,pic,url,source,renew) values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",MovieList[i].MoiveName,
                                MovieList[i].Director,MovieList[i].ActorName,MovieList[i].MoiveType,MovieList[i].MoiveArea,MovieList[i].Rate,MovieList[i].MoiveAlias,
                                MovieList[i].Releasedate,MovieList[i].MoiveRevew,MovieList[i].MovieComment,MovieList[i].MoviePic,MovieList[i].MoiveUrl,MovieList[i].MovieSorce,MovieList[num].Updata);
                            if(InsertTableInfo(buf,"0000100000")==1)
                                printf("Yes!");
                        }
                    }

     5、建立文本文档 跟踪记录 时,可以实时把 记录刷下来

    fflush( pWriteFile );

    这是根据文件读写的 缓存 原理

    6、socket里面的gethostbyname函数 失效的时候,可以重启下机子

  • 相关阅读:
    QTreeWidget创建
    Qt QTreeWidget节点的添加+双击响应+删除详解(转)
    Qt QTreeWidget 树形结构实现(转)
    QMessageBox类学习:
    QAction类详解:
    Qt事件和信号的区别 .
    Qt消息机制和事件(二)
    Qt消息机制和事件(一)
    初步开始学习图
    图中最短路径算法(Dijkstra算法)(转)
  • 原文地址:https://www.cnblogs.com/zibuyu/p/3234222.html
Copyright © 2011-2022 走看看