Solved

No value given for required parameter error when updating access table

Posted on 2008-06-20
11
362 Views
Last Modified: 2013-11-05
I am updating an access table, the table only has two columns, and one row at all times.

Basically it i an old-school way for us to track sessions.  When I try and execute the following SQL statement I receive a run-time error stating that No value was given for one or more required parameters.

Update tblEmployeeID Set EmpID=86, EmpPw='Uty33SoWR'

I have also tried it with double qupte around the password

THanks
Joshua
0
Comment
Question by:HolmesSPH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21834906
is EmpID an autonumber?

Update tblEmployeeID Set  EmpPw='Uty33SoWR' where EmpID=86
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 21834971
Offhand the SQL looks correct, assuming EmpID is numeric and EmpPw is a string.

Any chance you mis-spelled either tblEmployeeID (maybe tblEmployee?), EmpID, or EmpPw?
0
 

Author Comment

by:HolmesSPH
ID: 21835000
EmpId is not auto number, but it is numeric, and EmpPw is a Text type.

If I try this SQL statement

Update tblEmployeeID Set EmpID=86

if works, however it's when I add the EmpPw data that I get the error.  Also, I can tell by capricorn1's post that I wasn't clear enough, this table one has one record, so in the update statement where is no need to use a where clause.  When we update this table/record we always update the same record, there is never more then one :-)
0
How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21835064
how about this

Update tblEmployeeID Set  EmpPw='Uty33SoWR'

does it work?
0
 

Author Comment

by:HolmesSPH
ID: 21835073
Nope, I tried that, thought maybe I would just do two separate queries but that query fails.  When I update on EmpPw is when I get the error... It's odd, I swear I've never seen such wierd things in my entire life until I started working on this Access DB for this company lol
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21835113
can you open the table in design view and see the field names and data  types.


or better if you can  attach your db here, check the Attach File below
0
 

Author Comment

by:HolmesSPH
ID: 21835153
lol, yeah, but before any one else tries to attempt this one, let me just say that I've been programming for almost 8 years now, VB, VBA, VB.NET, C#, C, PHP, Perl yada yada... lol I've tried every "simple" mistake there is out there already.

Now in regards to attaching the database, I can't do that, it's 40 megs.

But the columns are as follows;

EmpID:
Long Integer
Decimals Auto
Default 0
Required 0
Indexed Yes Duplicated ok

EmpPw:
Text
Field Size 50
Required No
Allow Zero Length Yes
Indexed no Unicode Compression Yes

Other then that... there's really nothing else in the table.. All I did was add the EmpPw column and add it to the query str...  :-)
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21835228
create a blank db and import the table tblEmployeeID  ( attach this db here)

try your query again in the new db

also try doing a Compact and Repair if you haven't done so.

0
 

Author Closing Comment

by:HolmesSPH
ID: 31469326
oddly enough a compact/repair did it... Doesn't make much sense to me lol but all well.. thanks :-)
0
 

Author Comment

by:HolmesSPH
ID: 21845656
I should mention as well that I tried (before the compact repair) to use the decompile command from the command line.

> Path To Microsoft Office
> msaccess /decompile nameOfDatabase.mdb

This command has helped me out a lot while doing serious VBA work, but it appears the problem I was having couldn't have been caused by the VBA code I guess, the compact repair must have refreshed something because the table was an access table not a  linked table like 90% of the database... Interesting case lol
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21845719
info here re Compact and repair

http://support.microsoft.com/kb/209769/EN-US/
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question