标题:vb.net ConnectionString 属性尚未初始化
只看楼主
dongmudong
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-12-4
 问题点数:0 回复次数:0 
vb.net ConnectionString 属性尚未初始化
        Dim conn As SqlConnection
        Dim da As SqlDataAdapter
        Dim ds As DataSet
        conn = New SqlConnection
        da = New SqlDataAdapter()
        ds = New DataSet


        conn.ConnectionString = "Data Source=20101127-0930;Initial Catalog=数据库名;Integrated Security=True"
        conn.Open()


        da.SelectCommand = New SqlCommand
        da.SelectCommand.Connection = New SqlConnection

        da.Fill(ds, ds.DataSetName)
        DataGridView1.DataSource = "数据表"
运行时显示 ConnectionString 属性尚未初始化
搜索更多相关主题的帖子: 属性 
2010-12-04 14:53



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-327882-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.520687 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved