为了自由,幸福而不断奋斗,前行!!!

一笑看风云过....

博客园 首页 新随笔 联系 订阅 管理
app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <connectionStrings>
      <clear/>
        <add name="TgNetVideo.Properties.Settings.shidevideoConnectionString"
            connectionString="server=192.168.1.121;user id=shide;password=shide;persist security info=True;database=shidevideo;port=3307"
            providerName="MySql.Data.MySqlClient" />
    </connectionStrings>
</configuration>

引用:private string CONNSTR = System.Configuration.ConfigurationManager.ConnectionStrings["TgNetVideo.Properties.Settings.shidevideoConnectionString"].ToString();
刚开始只是引用了shidevideoConnectionString。老是出现“未将对象引用设置到对象实例”错误!
posted on 2008-07-08 14:31  YAO'STAR  阅读(1682)  评论(0编辑  收藏  举报