Click here to Skip to main content
15,924,402 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionsearching a formatted Listbox Pin
iSeeGhosts26-Oct-07 16:47
iSeeGhosts26-Oct-07 16:47 
AnswerRe: searching a formatted Listbox Pin
Luc Pattyn26-Oct-07 16:59
sitebuilderLuc Pattyn26-Oct-07 16:59 
QuestionCode For Closing The One Windows Form Pin
Pavan s26-Oct-07 14:45
Pavan s26-Oct-07 14:45 
AnswerRe: Code For Closing The One Windows Form Pin
Dave Kreskowiak27-Oct-07 3:36
mveDave Kreskowiak27-Oct-07 3:36 
QuestionTDateTime (Delphi) to VB conversion Pin
Hurricane300026-Oct-07 13:02
Hurricane300026-Oct-07 13:02 
AnswerRe: TDateTime (Delphi) to VB conversion Pin
Dave Kreskowiak27-Oct-07 3:40
mveDave Kreskowiak27-Oct-07 3:40 
GeneralRe: TDateTime (Delphi) to VB conversion Pin
Hurricane300027-Oct-07 5:26
Hurricane300027-Oct-07 5:26 
QuestionSystem.Data.SqlClient.SqlDataReader has no instructor??? Pin
kc_renji26-Oct-07 8:07
kc_renji26-Oct-07 8:07 
The error is highighter at While sqlReader.Read()
Is there a syntax error?
please help.



Dim conMbr As New SqlConnection
Dim cmdMbr As New SqlCommand

Dim sqlReader As New 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=@usrId AND memberPassword=@pwd"
cmdMbr = New SqlCommand(strVerifyMbr,conMbr)

Dim checkUsr as string =""

While sqlReader.Read()

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

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

Server.Transfer("Main.aspx")

Else
Response.Write("window.alert('Invalid Password. Please try again.');<" + "/script>")
Server.Transfer("Main.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("staffLogin.aspx")
End If




<div class="ForumSig">Life is up and down
Nevertheless,never give up hope and be confident to yourself</div>
AnswerRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
Dave Kreskowiak26-Oct-07 9:54
mveDave Kreskowiak26-Oct-07 9:54 
GeneralRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
Paul Conrad26-Oct-07 17:41
professionalPaul Conrad26-Oct-07 17:41 
GeneralRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
Dave Kreskowiak26-Oct-07 18:13
mveDave Kreskowiak26-Oct-07 18:13 
GeneralRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
Paul Conrad27-Oct-07 13:06
professionalPaul Conrad27-Oct-07 13:06 
AnswerRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
pmarfleet26-Oct-07 11:48
pmarfleet26-Oct-07 11:48 
AnswerRe: System.Data.SqlClient.SqlDataReader has no instructor??? Pin
Guffa26-Oct-07 23:02
Guffa26-Oct-07 23:02 
QuestionMy Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster26-Oct-07 8:05
SlickyMaster26-Oct-07 8:05 
AnswerRe: My Access database isn't being updated, but no errors occurred in my application Pin
Dave Kreskowiak26-Oct-07 9:49
mveDave Kreskowiak26-Oct-07 9:49 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
Paul Conrad27-Oct-07 8:32
professionalPaul Conrad27-Oct-07 8:32 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 1:19
SlickyMaster29-Oct-07 1:19 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
Dave Kreskowiak29-Oct-07 2:23
mveDave Kreskowiak29-Oct-07 2:23 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 3:58
SlickyMaster29-Oct-07 3:58 
AnswerRe: My Access database isn't being updated, but no errors occurred in my application Pin
Paul Conrad27-Oct-07 8:33
professionalPaul Conrad27-Oct-07 8:33 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 4:39
SlickyMaster29-Oct-07 4:39 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
Paul Conrad29-Oct-07 12:57
professionalPaul Conrad29-Oct-07 12:57 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster30-Oct-07 1:26
SlickyMaster30-Oct-07 1:26 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster30-Oct-07 8:19
SlickyMaster30-Oct-07 8:19 

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.