Click here to Skip to main content
15,892,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: IndexOutOfRange..please help Pin
kc_renji18-Nov-07 23:07
kc_renji18-Nov-07 23:07 
GeneralRe: IndexOutOfRange..please help Pin
Colin Angus Mackay18-Nov-07 23:50
Colin Angus Mackay18-Nov-07 23:50 
GeneralRe: IndexOutOfRange..please help Pin
kc_renji27-Nov-07 5:43
kc_renji27-Nov-07 5:43 
Questionvb2005 Pin
vb.net818-Nov-07 22:05
vb.net818-Nov-07 22:05 
AnswerRe: vb2005 Pin
DigiOz Multimedia19-Nov-07 8:55
DigiOz Multimedia19-Nov-07 8:55 
AnswerRe: vb2005 Pin
nishkarsh_k19-Nov-07 16:38
nishkarsh_k19-Nov-07 16:38 
QuestionHow to save datagridview contents into xml and retrieve the same Pin
VB 8.018-Nov-07 20:37
VB 8.018-Nov-07 20:37 
Questioncode error Pin
kc_renji18-Nov-07 20:36
kc_renji18-Nov-07 20:36 
when i try to run the appication and login, there is an error SqlException was unhandle by the user code, Must declare the scalar variable "txtUserId"..What is that mean??Im still a beginner..
Please help.here is the code:

Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click

Dim conMbr As New SqlConnection
Dim cmdMbr As New SqlCommand
Dim sqlReader As SqlDataReader

Dim strVerifyMbr As String

conMbr = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Program
Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GpsCinema.mdf';Initial
Catalog=GpsCinema;Persist Security Info=True;User
ID=sa;Password=password;MultipleActiveResultSets=True;Connect Timeout=30;User
Instance=False;Context Connection=False")

conMbr.Open()

strVerifyMbr = "SELECT MemberId FROM datMember WHERE memberUserName=@txtUserId.text AND
memberPassword=@txtPwd.Text"

cmdMbr = New SqlCommand(strVerifyMbr, conMbr)

Dim checkUsr As String = ""

(CODE ERROR)here ->sqlReader = cmdMbr.ExecuteReader

While sqlReader.Read

If txtUserId.Text = Convert.ToString(sqlReader("memberUsername")) Then

If txtPwd.Text = Convert.ToString(sqlReader("memberPassword")) Then
Session("username") = sqlReader("memberUsername")
Session("password") = sqlReader("memberPassword")

Server.Transfer("MainUser.aspx")

Else
Response.Write("window.alert('Invalid Password.
Please try again.');<" + "/script>")
Server.Transfer("MainUser.aspx")
End If
End If
checkUsr = "Failed"

End While

If checkUsr = "Failed" Then
Response.Write("<SCRIPT lanquage='JScript'>window.alert('Invalid Username! Please Try Again.');<" + "/SCRIPT>")
Server.Transfer("MainUser.aspx")
End If

conMbr.Close()
End Sub

<div class="ForumSig">Life is up and down
Nevertheless,never give up hope and be confident to yourself</div>
AnswerRe: code error Pin
pmarfleet18-Nov-07 21:27
pmarfleet18-Nov-07 21:27 
GeneralRe: code error Pin
kc_renji18-Nov-07 22:07
kc_renji18-Nov-07 22:07 
QuestionDataGridView autogenerated columns Pin
divyesh143218-Nov-07 20:05
divyesh143218-Nov-07 20:05 
AnswerRe: DataGridView autogenerated columns Pin
Dave Kreskowiak19-Nov-07 10:09
mveDave Kreskowiak19-Nov-07 10:09 
QuestionPlz help me Pin
poonams18-Nov-07 19:58
poonams18-Nov-07 19:58 
AnswerRe: Plz help me Pin
Colin Angus Mackay18-Nov-07 22:49
Colin Angus Mackay18-Nov-07 22:49 
GeneralRe: Plz help me Pin
deathbat20-Nov-07 13:25
deathbat20-Nov-07 13:25 
GeneralRe: Plz help me Pin
Colin Angus Mackay20-Nov-07 13:29
Colin Angus Mackay20-Nov-07 13:29 
QuestionHow to make datagrid searchable Pin
Rock Star.18-Nov-07 19:20
Rock Star.18-Nov-07 19:20 
AnswerRe: How to make datagrid searchable Pin
Vimalsoft(Pty) Ltd19-Nov-07 2:55
professionalVimalsoft(Pty) Ltd19-Nov-07 2:55 
QuestionSet outlook pst path [modified] Pin
Sinchan Nikam18-Nov-07 19:06
Sinchan Nikam18-Nov-07 19:06 
QuestionLoad only MSsql files with MyProject Setup Pin
r_mohd18-Nov-07 18:17
r_mohd18-Nov-07 18:17 
Questionwindow Services Pin
M.Sathiskumar18-Nov-07 18:07
M.Sathiskumar18-Nov-07 18:07 
QuestionWMA Tags - Editing and Saving Pin
abrobst18-Nov-07 16:00
abrobst18-Nov-07 16:00 
QuestionExporting VB.Net report to snapshot format (.snp)? Pin
myKing_20m18-Nov-07 13:41
myKing_20m18-Nov-07 13:41 
Question"source code different to original" Pin
Akaaha18-Nov-07 11:35
Akaaha18-Nov-07 11:35 
AnswerRe: "source code different to original" Pin
Christian Graus18-Nov-07 11:42
protectorChristian Graus18-Nov-07 11:42 

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.