I'm working on my first VB application. I have a dataset in my datasources which includes tables holding username/password information. When the application opens, I have a login form open first. In the code for this form, I want it to select the appropriate record from the UserInfo table (based on the UserName entered in the form) and compare the user/pass combo to the data from the table, then make a decision about the next action based on that result.
All very simple, I know.
My question is this, however. I already have a connection string for the datasource in the project. I can view it in Settings.Designer.vb.
[tt]
Namespace My
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=AD4;Initial Catalog=M2MAydinOther;Integrated Security=True")> _
Public ReadOnly Property M2MAydinOtherConnectionString() As String
Get
Return CType(Me("M2MAydinOtherConnectionString"),String)
End Get
End Property
End Class
End Namespace
[/tt]
Is there anyway I can call that connection string, instead of typing it out in the Login Form coding?
Cheryl dc Kern
All very simple, I know.
My question is this, however. I already have a connection string for the datasource in the project. I can view it in Settings.Designer.vb.
[tt]
Namespace My
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=AD4;Initial Catalog=M2MAydinOther;Integrated Security=True")> _
Public ReadOnly Property M2MAydinOtherConnectionString() As String
Get
Return CType(Me("M2MAydinOtherConnectionString"),String)
End Get
End Property
End Class
End Namespace
[/tt]
Is there anyway I can call that connection string, instead of typing it out in the Login Form coding?
Cheryl dc Kern