Click here to Skip to main content
15,930,182 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Bluetooth GPS Windows mobile 2003 Pin
Dave Kreskowiak26-May-07 6:17
mveDave Kreskowiak26-May-07 6:17 
GeneralRe: Bluetooth GPS Windows mobile 2003 [modified] Pin
Mrhappy2231-May-07 2:11
Mrhappy2231-May-07 2:11 
GeneralRe: Bluetooth GPS Windows mobile 2003 Pin
Mrhappy2231-May-07 2:17
Mrhappy2231-May-07 2:17 
QuestionIcon not saving in correct format Pin
MatrixCoder24-May-07 10:29
MatrixCoder24-May-07 10:29 
AnswerRe: Icon not saving in correct format Pin
Sonia Gupta24-May-07 18:56
Sonia Gupta24-May-07 18:56 
GeneralRe: Icon not saving in correct format Pin
MatrixCoder24-May-07 19:14
MatrixCoder24-May-07 19:14 
QuestionVB.NET / Database question Pin
Tom Wright24-May-07 7:45
Tom Wright24-May-07 7:45 
AnswerRe: VB.NET / Database question Pin
Johan Hakkesteegt24-May-07 20:21
Johan Hakkesteegt24-May-07 20:21 
Hi Tom,

By the look of it I think it might actually be reasonably easy (but no guarantees):
<br />
Private Sub logonBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles logonBtn.Click<br />
'Validate logon username and password.<br />
Dim myresult() As String<br />
myresult = Me.TeacherTableAdapter.usernamePassword(PasswordTextBox.Text, UsernameTextBox.Text)<br />
If myresult.GetValue(0) = 0 Then<br />
MessageBox.Show("Logon Error; Username or Password is incorrect")<br />
Exit Sub<br />
End If<br />
MessageBox.Show("Welcome to Teachers Pet")<br />
Call LoadMainScreen()<br />
End Sub<br />


Tom Wright wrote:
userID, TGrade, FullName

It looks like you want to return data of different types, so the array would best be made of type String. You can then use the data from the myresult array with .GetValue(0-based index number here) and convert values from the string type to integer, etc. where needed.
As I don't know the code on the Me.TeacherTableAdapter.usernamePassword(PasswordTextBox.Text, UsernameTextBox.Text) side, your on your own making it return multiple values.

Hope this helps,

Johan

My advice is free, and you may get what you paid for.

AnswerRe: VB.NET / Database question Pin
SimulationofSai24-May-07 20:40
SimulationofSai24-May-07 20:40 
Questionhere's one for the books Pin
Tom Wright24-May-07 7:08
Tom Wright24-May-07 7:08 
AnswerRe: here's one for the books Pin
Dave Kreskowiak24-May-07 7:13
mveDave Kreskowiak24-May-07 7:13 
QuestionVB.Net windows service Pin
ThaScorpion24-May-07 6:54
ThaScorpion24-May-07 6:54 
AnswerRe: VB.Net windows service Pin
Dave Kreskowiak24-May-07 7:08
mveDave Kreskowiak24-May-07 7:08 
GeneralRe: VB.Net windows service Pin
ThaScorpion24-May-07 7:33
ThaScorpion24-May-07 7:33 
GeneralRe: VB.Net windows service Pin
Dave Kreskowiak24-May-07 7:43
mveDave Kreskowiak24-May-07 7:43 
QuestionStore procedure Pin
thanhphuong170324-May-07 6:27
thanhphuong170324-May-07 6:27 
AnswerRe: Store procedure Pin
Dave Kreskowiak24-May-07 7:03
mveDave Kreskowiak24-May-07 7:03 
Questionvb.net voice chat Pin
harddream24-May-07 4:44
harddream24-May-07 4:44 
AnswerRe: vb.net voice chat Pin
Colin Angus Mackay24-May-07 4:57
Colin Angus Mackay24-May-07 4:57 
GeneralRe: vb.net voice chat Pin
Johan Hakkesteegt25-May-07 0:45
Johan Hakkesteegt25-May-07 0:45 
QuestionRetrieving Windows User name/ID Pin
robw188824-May-07 4:35
robw188824-May-07 4:35 
AnswerRe: Retrieving Windows User name/ID Pin
Dave Kreskowiak24-May-07 5:37
mveDave Kreskowiak24-May-07 5:37 
GeneralRe: Retrieving Windows User name/ID Pin
robw188824-May-07 5:41
robw188824-May-07 5:41 
AnswerRe: Retrieving Windows User name/ID Pin
Dave Herren24-May-07 6:13
Dave Herren24-May-07 6:13 
QuestionStill having a problem using DataSets Pin
Quecumber25624-May-07 4:24
Quecumber25624-May-07 4:24 

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.