Click here to Skip to main content
15,888,235 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Limit the movement of scrolling Picture Pin
Christian Graus19-Dec-08 15:28
protectorChristian Graus19-Dec-08 15:28 
QuestionComboboxes and Collections Pin
LostMonkey19-Dec-08 3:41
LostMonkey19-Dec-08 3:41 
AnswerRe: Comboboxes and Collections Pin
Christian Graus19-Dec-08 16:40
protectorChristian Graus19-Dec-08 16:40 
QuestionCreating Logon screen with SQL Connection Pin
Shrimpersfan19-Dec-08 1:17
Shrimpersfan19-Dec-08 1:17 
AnswerRe: Creating Logon screen with SQL Connection Pin
Jon_Boy19-Dec-08 1:42
Jon_Boy19-Dec-08 1:42 
GeneralRe: Creating Logon screen with SQL Connection Pin
Shrimpersfan19-Dec-08 3:00
Shrimpersfan19-Dec-08 3:00 
GeneralRe: Creating Logon screen with SQL Connection Pin
Dave Kreskowiak19-Dec-08 4:47
mveDave Kreskowiak19-Dec-08 4:47 
GeneralRe: Creating Logon screen with SQL Connection Pin
Shrimpersfan19-Dec-08 6:18
Shrimpersfan19-Dec-08 6:18 
I have recently read a VB book, as you can imagine, i am a complete novice when it comes to vb and programming. I have written this piece of code. I was wondering if you could tell me if this would create a valid connection or not.

Imports System
Imports System.Data
Imports System.Data.SqlClient

Public Class frmLogin
Public sqlconnection As SqlConnection = New SqlConnection("Data Source=TG-IT-TPSRV;Initial Catalog=AFQ;User ID=sa;Password=;")
Public Sub frmLogin()

Dim sqlConn As SqlConnection = sqlconnection
Dim sqlComm As String = ("SELECT * FROM Users")

End Sub


Private Sub BtnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.Close()
End Sub

Public Sub Logon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click

Dim sConnectionString As String = "Source=TG-IT-TPSRV;Initial Catalog=AFQ;User ID=sa;Password=;"
Dim objConn As New SqlConnection(sConnectionString)
Dim sqlComm As String = ("SELECT * FROM Users")
Dim objComm As New SqlCommand(sqlComm, sqlconnection)
objConn.Open()


End Sub
End Class
GeneralRe: Creating Logon screen with SQL Connection Pin
Dave Kreskowiak19-Dec-08 7:48
mveDave Kreskowiak19-Dec-08 7:48 
Questionsplash screen to hold a some time to display to the mdiform Pin
jigneshDPatel19-Dec-08 0:53
jigneshDPatel19-Dec-08 0:53 
AnswerRe: splash screen to hold a some time to display to the mdiform Pin
Steven J Jowett19-Dec-08 1:18
Steven J Jowett19-Dec-08 1:18 
AnswerRe: splash screen to hold a some time to display to the mdiform Pin
Dave Kreskowiak19-Dec-08 4:43
mveDave Kreskowiak19-Dec-08 4:43 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
jigneshDPatel19-Dec-08 17:08
jigneshDPatel19-Dec-08 17:08 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
Dave Kreskowiak20-Dec-08 4:17
mveDave Kreskowiak20-Dec-08 4:17 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
jigneshDPatel21-Dec-08 16:53
jigneshDPatel21-Dec-08 16:53 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
Dave Kreskowiak21-Dec-08 18:29
mveDave Kreskowiak21-Dec-08 18:29 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
jigneshDPatel21-Dec-08 19:06
jigneshDPatel21-Dec-08 19:06 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
Dave Kreskowiak22-Dec-08 2:08
mveDave Kreskowiak22-Dec-08 2:08 
GeneralRe: splash screen to hold a some time to display to the mdiform Pin
jigneshDPatel22-Dec-08 17:42
jigneshDPatel22-Dec-08 17:42 
QuestionConvertion Tools Pin
nagendra.vk18-Dec-08 22:41
nagendra.vk18-Dec-08 22:41 
AnswerRe: Convertion Tools Pin
Steven J Jowett18-Dec-08 22:44
Steven J Jowett18-Dec-08 22:44 
GeneralRe: Convertion Tools Pin
nagendra.vk18-Dec-08 22:58
nagendra.vk18-Dec-08 22:58 
GeneralRe: Convertion Tools Pin
Expert Coming18-Dec-08 23:16
Expert Coming18-Dec-08 23:16 
AnswerRe: Convertion Tools Pin
Rajesh Anuhya18-Dec-08 22:51
professionalRajesh Anuhya18-Dec-08 22:51 
AnswerRe: Convertion Tools Pin
Thulasee Shan19-Dec-08 0:47
Thulasee Shan19-Dec-08 0:47 

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.