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)
 ACCESS - updating a record
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 27 October 2001 :  17:58:26  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I am trying to update an access database, and pulling my hair out. I swear I have everything right, im used to SQL not access so I could be missing something. Below is the code I am using...


set conn = Server.CreateObject("ADODB.Connection")
Conn.Open ("driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Inetpub\dosamigosdecor\db\aspcart5.mdb")

sql = "select dptid from idtable"
set rs = conn.execute(sql)

prodid = rs("dptid")

newval = prodid + 1

sql = "UPDATE idtable SET dptid='" & newval & "'"
conn.execute(sql)


The sql is outputting as UPDATE idtable SET dptid='330' and i have tried with and without ' but still no success. Can anyone see anything that is wrong?

Brad

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 27 October 2001 :  20:55:38  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
remove the quotes (') from your update string. If its an INT field, which I'm guessing it is, you dont need them

---------------
Da_Stimulator has spoken
Ongoing Project that uses Snitz forums as a backbone for entire website
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 28 October 2001 :  00:53:36  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
nope i tried that, i still get the same error. does anyone have another idea?

Brad
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 28 October 2001 :  01:17:37  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
im taking a guess that this is a permissions problem on the server, can anyone else confirm that this could be the cause?

Brad
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 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07