Click here to Skip to main content
16,010,650 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to connect via dsn Pin
Dave Kreskowiak3-Sep-05 6:11
mveDave Kreskowiak3-Sep-05 6:11 
Questionmy IDE is wacky! Pin
tcloud3-Sep-05 2:49
tcloud3-Sep-05 2:49 
AnswerRe: my IDE is wacky! Pin
Charlie Williams3-Sep-05 18:49
Charlie Williams3-Sep-05 18:49 
GeneralRe: my IDE is wacky! Pin
tcloud4-Sep-05 3:34
tcloud4-Sep-05 3:34 
Questiondatabase in vb6 ! Pin
Anonymous3-Sep-05 2:30
Anonymous3-Sep-05 2:30 
AnswerRe: database in vb6 ! Pin
°[Halo]°3-Sep-05 9:10
°[Halo]°3-Sep-05 9:10 
GeneralRe: database in vb6 ! Pin
Anonymous5-Sep-05 19:22
Anonymous5-Sep-05 19:22 
QuestionInitilizing dataadapter Pin
nirdanon3-Sep-05 1:49
nirdanon3-Sep-05 1:49 
Hi,

i have a problem with executing select query which was added to dataadpter.

i have 2 select command.

' first select command

dbAdapterUsers.SelectCommand = New OleDbCommand _
("SELECT UserName FROM Users where UserName=? AND PassWord=?", dbConnGym)

dbAdapterUsers.SelectCommand.Parameters.Add("UserName", OleDbType.VarChar, 15, "UserName")
dbAdapterUsers.SelectCommand.Parameters.Add("PassWord", OleDbType.VarChar, 15, "PassWord")

' second select command

dbAdapterUsers.SelectCommand = New OleDbCommand _
("SELECT * FROM Users ", dbConnGym)


'filling the datatable

dbAdapterUsers.Fill(dsGYMObj.Users)

2 question:

1) if i change the order between the queries , i get error " parameter ?_1 has no default value." -- why its ok if i the order is as above

2)i execute login function - and i have a feeling that it execute the first query and not the one with the parameters.

login Public Shared Function Login(ByVal username As String, ByVal pass As String) As Boolean

dsGYMObj.Users.Clear()
dbAdapterUsers.SelectCommand.Parameters.Add("@UserName", OleDbType.VarChar, 15, "UserName").Value = username
dbAdapterUsers.SelectCommand.Parameters.Add("@PassWord", OleDbType.VarChar, 15, "PassWord").Value = pass

dbAdapterUsers.Fill(dsGYMObj.Users)


If Not dsGYMObj.Users Is Nothing Then
If dsGYMObj.Users.Rows.Count > 0 Then
Return True
Else
Return False
End If
End If

End Function

thanks
nir.
Questionhow to Making last column of listview upto the remaing width of listview control Pin
Rizwan Bashir3-Sep-05 1:19
Rizwan Bashir3-Sep-05 1:19 
AnswerRe: how to Making last column of listview upto the remaing width of listview control Pin
Anonymous3-Sep-05 2:23
Anonymous3-Sep-05 2:23 
Questionwindows explorer file context menu ? Pin
LuisCypher3-Sep-05 0:48
LuisCypher3-Sep-05 0:48 
AnswerRe: windows explorer file context menu ? Pin
Anonymous3-Sep-05 2:20
Anonymous3-Sep-05 2:20 
GeneralRe: windows explorer file context menu ? Pin
LuisCypher3-Sep-05 3:02
LuisCypher3-Sep-05 3:02 
QuestionRemoving excel object from memory Pin
inaureen3-Sep-05 0:02
inaureen3-Sep-05 0:02 
AnswerRe: Removing excel object from memory Pin
Dave Kreskowiak3-Sep-05 4:08
mveDave Kreskowiak3-Sep-05 4:08 
GeneralRe: Removing excel object from memory Pin
inaureen5-Sep-05 23:52
inaureen5-Sep-05 23:52 
QuestionCheckall property for datagrid Pin
inaureen2-Sep-05 22:01
inaureen2-Sep-05 22:01 
QuestionHow we access backend to TreeVIew Pin
mani_tac2-Sep-05 20:35
mani_tac2-Sep-05 20:35 
AnswerRe: How we access backend to TreeVIew Pin
Rizwan Bashir2-Sep-05 21:54
Rizwan Bashir2-Sep-05 21:54 
Questioninsurance domain project Pin
sandeepreddy2-Sep-05 19:03
sandeepreddy2-Sep-05 19:03 
AnswerRe: insurance domain project Pin
Colin Angus Mackay2-Sep-05 22:34
Colin Angus Mackay2-Sep-05 22:34 
GeneralRe: insurance domain project Pin
Anonymous3-Sep-05 18:33
Anonymous3-Sep-05 18:33 
QuestionOnly 1 instance Pin
kenexcelon2-Sep-05 17:26
kenexcelon2-Sep-05 17:26 
AnswerRe: Only 1 instance Pin
Dave Kreskowiak3-Sep-05 4:05
mveDave Kreskowiak3-Sep-05 4:05 
AnswerRe: Only 1 instance Pin
quacks_a_lot3-Sep-05 17:22
quacks_a_lot3-Sep-05 17:22 

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.