-
September 25th, 2011, 03:52 AM
#1
no value given for one or more parameters
help pls i always get error i use it to get values in my table consist of both numbers and text in this part of my code
brs = dbconn.Execute("SELECT * from Question where Categories = " & QuestCategory & " and Difficulty = " & Difficult & " and QNum = " & QuestNum)
(error no value given for one or more parameters)
in
Set dbconn = New ADODB.Connection
Set dbrs = New ADODB.Recordset
Dim record1 As String
Dim strapp As String
strapp = IIf(Right$(App.Path, 1) = "\", "", "\database\")
record1 = App.Path & strapp & "Custon Question Databank.mdb"
dbconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & record1 & ";Persist Security Info=False"
dbconn.Open
dbrs = dbconn.Execute("SELECT * from Question where Categories = " & QuestCategory & " and Difficulty = " & Difficult & " and QNum = " & QuestNum)
If dbrs.EOF = True Then
MsgBox "No Question Exist", vbCritical
RollCategory.Show
RollCategory.Timer1.Interval = 150
Else
QuestionDisplayLbl.Caption = dbrs!Questions
ALbl.Caption = dbrs!A
BLbl.Caption = dbrs!B
CLbl.Caption = dbrs!C
DLbl.Caption = dbrs!D
Correctans = Trim(dbrs!correct_answers)
dbrs.Close
dbconn.Close
TimerPrize2.Enabled = False
End If
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|