C
Chen
I have a project which contain several WinForms. I put a SqlDataAdapter in
Many of the Forms.
I want these SqlConnection1.ConnectionString Point to the same SQL Server.
So I create a Global Const strConnection in a Module
and I change the SqlConnection1.ConnectionString lile and set the
SqlConnection1.ConnectionString = strConnection in the code of each form.
(I find I cannot set the SqlConnection1.ConnectionString to strConnection
the property window)
The problem is the VB often automaticely delete the line and complain
ConnectionString not set.
any idea.
Thanks
'Public Const StrConnection As String = "data source=A;..."
'Public Const StrConnection As String = "data source= B;...."
'Public Const StrConnection As String = "data source=C;..."
Public Const StrConnection As String = "data source=P;..."
Many of the Forms.
I want these SqlConnection1.ConnectionString Point to the same SQL Server.
So I create a Global Const strConnection in a Module
and I change the SqlConnection1.ConnectionString lile and set the
SqlConnection1.ConnectionString = strConnection in the code of each form.
(I find I cannot set the SqlConnection1.ConnectionString to strConnection
the property window)
The problem is the VB often automaticely delete the line and complain
ConnectionString not set.
any idea.
Thanks
'Public Const StrConnection As String = "data source=A;..."
'Public Const StrConnection As String = "data source= B;...."
'Public Const StrConnection As String = "data source=C;..."
Public Const StrConnection As String = "data source=P;..."