Reply
SQL error "no value given for one or more required parameters
Old 07-30-2010, 10:01 PM SQL error "no value given for one or more required parameters
Junior Talker

Posts: 1
Name: Bernard
Trades: 0
First of all, hello from Thailand as this is my first post on this forum
about myself: I am working for a school here (Deputy headmaster and teacher of accounting) and started to develop an application to manage different aspects of the school life. I am not a programmer but I have been using VBA for Excel quite intensively since excel is supporting vba (Excel 5 -95) I decided a couple of months ago to start using VB6, ADO and ACCESS.
I decided to join this forum because I found different posts and good answers dealing with problems similar to mine.
I have many functions that work perfectly in my application, but I am facing a weird problem
I added one field to a table containing users , u_Active as I don't want to display names of staff who quit and I don't like to erase their names either. The field format is number, integer, the value 1 or 0
this query works:
strSQL = "SELECT [u_User Name] FROM Users ORDER BY u_UserID"
this one triggers the error message
strSQL = "SELECT [u_User Name] FROM Users WHERE u_Active=1 ORDER BY u_UserID"
Now the very weird thing is that the 2nd query works when I run it in ACCESS directly.

Cybernard is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 08-12-2010, 10:53 PM Re: SQL error "no value given for one or more required parameters
Average Talker

Posts: 19
Name: GotLiveChat Employee
Location: Upstate NY
Trades: 0
Possibly the [u_User Name] is causing the problem, either due to the space in the name, or that you're not passing a value for [u_User Name] (when calling the query).
What happens if you replace [u_User Name] with any valid username?
__________________
GotLiveChat :: Live Support Software w/ Real-Time Monitoring
www.GotLiveChat.com
gotlivechat is offline
Reply With Quote
View Public Profile Visit gotlivechat's homepage!
 
Reply     « Reply to SQL error "no value given for one or more required parameters
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11713 seconds with 13 queries