HolmesSPH
asked on
No value given for required parameter error when updating access table
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
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
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?
Any chance you mis-spelled either tblEmployeeID (maybe tblEmployee?), EmpID, or EmpPw?
ASKER
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 :-)
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 :-)
how about this
Update tblEmployeeID Set EmpPw='Uty33SoWR'
does it work?
Update tblEmployeeID Set EmpPw='Uty33SoWR'
does it work?
ASKER
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
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
or better if you can attach your db here, check the Attach File below
ASKER
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... :-)
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... :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oddly enough a compact/repair did it... Doesn't make much sense to me lol but all well.. thanks :-)
ASKER
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
> 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
Update tblEmployeeID Set EmpPw='Uty33SoWR' where EmpID=86