Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Microsoft JET Database Engine (0x80040E10)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

ngaisteve1
Junior Member

Malaysia
241 Posts

Posted - 02 November 2003 :  22:28:58  Show Profile  Send ngaisteve1 an ICQ Message
When I run this code, I this error message.

Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.

The code is below:

strcounter = 1
do while not rs.eof
conn.execute "update customer set custID = " & strCounter & " "
strCounter = strCounter + 1
rs.movenext
loop

My existing table do not have incremental no as primary key. That's why I thought about having this code to add those number as primary key.

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 02 November 2003 :  23:22:21  Show Profile  Visit Gremlin's Homepage
Whats the primary key in your database now ? You should be able to add a new column and set it to autonumber and Access will do everything for you automatically.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

ngaisteve1
Junior Member

Malaysia
241 Posts

Posted - 02 November 2003 :  23:38:12  Show Profile  Send ngaisteve1 an ICQ Message
I realize that actually. I plan to use this but that is new record. Regarding my existing records, the primary key is to be keyed by the user, which shouldn't be. So, my plan is actually auto update a number increment by one for new record before setting it autonumber for new record.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 03 November 2003 :  00:08:59  Show Profile  Visit Gremlin's Homepage
You can still add an autonumber field to existing records and access will populate it for you.

In regards to your code, you need to tell the update which record your trying to update, just doing a select and then trying to update it won't work, basically you'll need a WHERE clause added which will determine which record is to be updated.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

ngaisteve1
Junior Member

Malaysia
241 Posts

Posted - 03 November 2003 :  01:05:49  Show Profile  Send ngaisteve1 an ICQ Message
I see. Thanks.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 03 November 2003 :  01:56:01  Show Profile  Visit Gremlin's Homepage
Your welcome.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07