如何在已经设计完成的系统中再添加一个系统登录界面
这个是连接数据库的模块,可以在不修改连接数据库的模块下直接添加吗
Public Shared Function GetConnection() As String
Return "Data Source=GZW-PC;Initial Catalog=SBManager;Persist Security Info=True;User ID=sa;Password=6221556"
End Function
Public Shared Function Excute(ByVal sql As String) As String
Dim constr As String = MainConfig.GetConnection()
Dim con As SqlConnection
con = New SqlConnection(constr)
con.Open()
Dim com As SqlCommand
com = New SqlCommand(sql, con)
com.Execute NonQuery()
Return ""
Public Shared Function GetRecord(ByVal sql As String) As DataSet
Dim ds As DataSet = New DataSet()
Dim constr As String = MainConfig.GetConnection()
Dim da As SqlDataAdapter = New SqlDataAdapter(sql, constr)
da.Fill(ds)
Return ds
End Function
[解决办法]
加个登陆form 界面,在工程选项里再将这个form 设为首先执行。
[解决办法]