Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: WHERE WILL I GET VB.NET PROJECT Pin
Smithers-Jones22-Jan-10 3:51
Smithers-Jones22-Jan-10 3:51 
Questiondatareader error how to solve Pin
Patrício dos Santos21-Jan-10 5:07
Patrício dos Santos21-Jan-10 5:07 
AnswerRe: datareader error how to solve Pin
Dave Kreskowiak21-Jan-10 5:19
mveDave Kreskowiak21-Jan-10 5:19 
GeneralRe: datareader error how to solve Pin
Patrício dos Santos21-Jan-10 5:41
Patrício dos Santos21-Jan-10 5:41 
GeneralRe: datareader error how to solve Pin
Dave Kreskowiak21-Jan-10 6:45
mveDave Kreskowiak21-Jan-10 6:45 
GeneralRe: datareader error how to solve Pin
Patrício dos Santos21-Jan-10 8:45
Patrício dos Santos21-Jan-10 8:45 
GeneralRe: datareader error how to solve Pin
Dave Kreskowiak21-Jan-10 9:37
mveDave Kreskowiak21-Jan-10 9:37 
GeneralRe: datareader error how to solve Pin
Patrício dos Santos21-Jan-10 10:09
Patrício dos Santos21-Jan-10 10:09 
Step 1: Yes, we assume that the user exist.

step 2: I can execute this part of code...

Dim SQL As String<br />
SQL = "SELECT U.CodUser, U.FullName FROM tblUser U INNER JOIN tblAccess A ON U.CodUser = A.CodUser WHERE A.AccessLevel = 'Admin' AND A.CodUser = @CodUser"<br />
Dim myCommand = New SqlCommand(SQL, myConnection)<br />
myCommand.Parameters.Add("@CodUser", SqlDbType.VarChar).Value = CardNum<br />
<br />
Dim reader As SqlDataReader = myCommand.ExecuteReader()<br />
Dim reader2 As SqlDataReader = myCommand2.ExecuteReader()<br />
'Caso existam linhas<br />
If reader.HasRows Then<br />
While reader.Read()<br />
lblFullName.Text = reader(1)<br />
lblLevel.Text = "Admin"<br />
txtCardNum.Text = ""<br />
End While<br />
reader.Close()<br />
<br />
...<br />


if the user exists and is admin, I can print their full name, but is not admin but exists, I cannot do it

Else<br />
lblNomeCliente.Text = reader(1)<br />
lblLevel.Text = "Normal User"<br />
txtCardNum.Text = ""<br />
reader.Close()<br />
End If


I receave always the error that the datareader is closed, but if I close it (reader.close() ) I receave other error that there no data or something like this

PS: sorry my english, I am angolan

thanks
GeneralRe: datareader error how to solve Pin
Dave Kreskowiak21-Jan-10 10:33
mveDave Kreskowiak21-Jan-10 10:33 
Question.dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
Mr Oizo20-Jan-10 22:37
Mr Oizo20-Jan-10 22:37 
AnswerRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
DaveAuld21-Jan-10 2:25
professionalDaveAuld21-Jan-10 2:25 
GeneralRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
Mr Oizo21-Jan-10 21:05
Mr Oizo21-Jan-10 21:05 
GeneralRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
DaveAuld21-Jan-10 21:15
professionalDaveAuld21-Jan-10 21:15 
GeneralRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
Mr Oizo24-Jan-10 23:09
Mr Oizo24-Jan-10 23:09 
GeneralRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
DaveAuld25-Jan-10 0:34
professionalDaveAuld25-Jan-10 0:34 
GeneralRe: .dat fixed length files being compressed when e-mailed to recipient through vb.net (URGENT!!!) Pin
Mr Oizo25-Jan-10 3:13
Mr Oizo25-Jan-10 3:13 
QuestionHow to seperate Letters, Numbers from a string? Pin
Paramu197320-Jan-10 22:12
Paramu197320-Jan-10 22:12 
AnswerRe: How to seperate Letters, Numbers from a string? Pin
Wayne Gaylard20-Jan-10 22:27
professionalWayne Gaylard20-Jan-10 22:27 
GeneralRe: How to seperate Letters, Numbers from a string? Pin
Paramu197320-Jan-10 22:35
Paramu197320-Jan-10 22:35 
GeneralRe: How to seperate Letters, Numbers from a string? Pin
Richard MacCutchan21-Jan-10 2:43
mveRichard MacCutchan21-Jan-10 2:43 
QuestionHow To Insert Username And Password Into MySql Using Vb.net's Form Pin
bernard tang20-Jan-10 20:27
bernard tang20-Jan-10 20:27 
AnswerRe: How To Insert Username And Password Into MySql Using Vb.net's Form Pin
Wayne Gaylard20-Jan-10 20:50
professionalWayne Gaylard20-Jan-10 20:50 
GeneralRe: How To Insert Username And Password Into MySql Using Vb.net's Form Pin
bernard tang20-Jan-10 22:46
bernard tang20-Jan-10 22:46 
GeneralRe: How To Insert Username And Password Into MySql Using Vb.net's Form [modified] Pin
Wayne Gaylard21-Jan-10 0:26
professionalWayne Gaylard21-Jan-10 0:26 
QuestionMemory usage Pin
cstrader23220-Jan-10 17:26
cstrader23220-Jan-10 17:26 

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.