Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Updating records in ASP with Execute command


  • Please log in to reply

#1
Immortalarena

Immortalarena

    Member

  • Member
  • PipPipPip
  • 216 posts
If I want to delete multiple records it works fine, but I tried to update multiple records and I think I have something wrong with my code. It is updating the records, but it is just putting numbers in instead of the information I want.

I should have Values True and 01/15/2011
but I get -1 and 31510028178352E

I know the problem is Here:

adoCon.execute("update library SET flagged = "&truth&" where book_ID ="&sflag&";")
	adoCon.execute("update library SET expiration = "&expireing&" where book_ID ="&sflag&";")

expireing and Truth are both passed from a form on the previous page. The full code will update multiple records at a time, but right now it is inserting the wrong information... or it is inserting it the wrong way. The fields are text fields in the database.

It is most likely an obvious fix, but I don't see what I am missing. Any help would be appreciated. Thanks,

Matt :)
  • 0

Advertisements


#2
Immortalarena

Immortalarena

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 216 posts
Answered my own question. I needed to add a single quotation on the outside of the double quotation as below.

adoCon.execute("update library SET flagged = '"&truth&"' where book_ID ="&sflag&";")
	adoCon.execute("update library SET expiration = '"&expireing&"' where book_ID ="&sflag&";")

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP