Click here to Skip to main content
16,004,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: I need VB.NET chat project Pin
Horanis16-Dec-07 12:36
Horanis16-Dec-07 12:36 
GeneralRe: I need VB.NET chat project Pin
CKnig16-Dec-07 18:15
CKnig16-Dec-07 18:15 
GeneralRe: I need VB.NET chat project Pin
Horanis17-Dec-07 7:56
Horanis17-Dec-07 7:56 
Questionhow to manipulate a simple program from my VB Pin
Ronny Ron11-Dec-07 6:36
Ronny Ron11-Dec-07 6:36 
GeneralRe: how to manipulate a simple program from my VB Pin
Christian Graus11-Dec-07 14:17
protectorChristian Graus11-Dec-07 14:17 
QuestionAutomating MS Outlook with VB.NET to do a find and replace on message body text Pin
craigmg7811-Dec-07 4:30
craigmg7811-Dec-07 4:30 
GeneralRe: Automating MS Outlook with VB.NET to do a find and replace on message body text Pin
craigmg7811-Dec-07 11:35
craigmg7811-Dec-07 11:35 
Questionhow do i access a property in a class on a form Pin
imonfiredammit11-Dec-07 4:10
imonfiredammit11-Dec-07 4:10 
Here is my problem...I have the following class:

Public Class Login 'in Database_Class library
Public m_User As String
Public m_Password As String
Public Sub New()

End Sub
Public Property UserName() As String
Get
Return m_User
End Get
Set(ByVal value As String)
m_User = value
End Set
End Property

Public Property Password() As String
Get
Return m_Password
End Get
Set(ByVal value As String)
m_Password = value
End Set
End Property


End Class


This class is going to hold login information...I have a form that a user will enter in the user name and password.

My question is this. I am trying to connect to a database using a connection string (which works). I dont want to provide my username and password directly into the connection string so I decided to set up a class for my login info so i can use a login form. I want to append the user name and password into the connection string and it doesnt work. I have the following in my connection class...

Imports Database_Class 'The class library that contains the Login Class
Imports System.Data.oracleClient
Public Class Connection
Public Shared Function GetConnection() As OracleConnection
Dim connectionString As String = "Data Source = PIDBDEV; User ID= " & UserName & ";Password = " & Password & " ;Unicode = True;"
Return New OracleConnection(connectionString) Return New OracleConnection(connectionString)

End Function


so what am I doing wrong? How do you access the values contained in a property contained in a class library in another class??

Erica

AnswerRe: how do i access a property in a class on a form Pin
Dave Kreskowiak11-Dec-07 4:19
mveDave Kreskowiak11-Dec-07 4:19 
GeneralRe: how do i access a property in a class on a form Pin
imonfiredammit11-Dec-07 4:37
imonfiredammit11-Dec-07 4:37 
GeneralRe: how do i access a property in a class on a form Pin
Dave Kreskowiak11-Dec-07 5:31
mveDave Kreskowiak11-Dec-07 5:31 
GeneralTreeview Icons problem Pin
Mbire11-Dec-07 1:12
Mbire11-Dec-07 1:12 
General.NET DLL in a VB6.0 Application Pin
andyORS10-Dec-07 23:58
andyORS10-Dec-07 23:58 
GeneralRe: .NET DLL in a VB6.0 Application Pin
coolestCoder11-Dec-07 0:15
coolestCoder11-Dec-07 0:15 
GeneralRe: .NET DLL in a VB6.0 Application [modified] Pin
andyORS11-Dec-07 0:48
andyORS11-Dec-07 0:48 
GeneralRe: .NET DLL in a VB6.0 Application Pin
coolestCoder11-Dec-07 3:09
coolestCoder11-Dec-07 3:09 
GeneralRe: .NET DLL in a VB6.0 Application Pin
Dave Kreskowiak11-Dec-07 4:13
mveDave Kreskowiak11-Dec-07 4:13 
GeneralFinding monthend date Pin
Mark0610-Dec-07 23:45
Mark0610-Dec-07 23:45 
GeneralRe: Finding monthend date Pin
Christian Graus10-Dec-07 23:54
protectorChristian Graus10-Dec-07 23:54 
Questiontry to using datagridview without dataset Pin
eyes200710-Dec-07 23:42
eyes200710-Dec-07 23:42 
GeneralRe: try to using datagridview without dataset Pin
John_Adams11-Dec-07 2:07
John_Adams11-Dec-07 2:07 
GeneralRe: try to using datagridview without dataset Pin
Dave Kreskowiak11-Dec-07 3:07
mveDave Kreskowiak11-Dec-07 3:07 
Questionexporting data Pin
stavros10-Dec-07 23:13
stavros10-Dec-07 23:13 
GeneralRe: exporting data Pin
CKnig10-Dec-07 23:23
CKnig10-Dec-07 23:23 
GeneralRe: exporting data Pin
stavros13-Dec-07 7:02
stavros13-Dec-07 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.