468,544 Members | 1,767 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Arguments are of the wrong type, are out of acceptable range, or are in conflict

Hey guys.

I'm banging my head against the wall here to try and understand why I keep receiving this error. I'm trying to update a record (http://www.simplymad.org/Rtape/select_contacts.asp) and I keep getting the above error. Can anyone help me understand where I should look for the problem here?

The most maddening part is that I have this working perfectly in another section of the site here: http://www.simplymad.org/Rtape/select_shows.asp

I've created text files for all the docs that are involved in this mess. They can be seen here:





Can anyone help save my sanity?

Thanks in advance!
Nov 6 '07 #1
3 2790
346 Expert 100+
This usually refers to a database or recordset connection error, usually a recordset.

Try replacing the code here... (as found in http://www.simplymad.org/RTape/TXT/select_contacts.txt)

Expand|Select|Wrap|Line Numbers
  1.            set db = server.createobject("ADODB.connection")
  2.                db.open "DSN=807838_contactsdb"
  3.            sSQL = "SELECT * FROM contacts"
  4.             set rs = db.execute(sSQL)
  5.            current=1

Expand|Select|Wrap|Line Numbers
  1. set db = server.createobject("ADODB.connection")
  2. db.open "DSN=807838_contactsdb"
  3. sSQL = "SELECT * FROM contacts"
  4. set rs = Server.CreateObject("ADODB.RecordSet")
  5. rs.Open sSQL, db, 3,3
If that doesn't work, you should have a look over your database connection string to make sure it is 100% correct.

This is just me being nit picky... but I'd also strongly recommend using a DO UNTIL loop instead of a WHILE loop.

Expand|Select|Wrap|Line Numbers
  1. Do Until rs.EOF
  2. 'some code
  3. rs.MoveNext
  4. Loop
Instead of saying "Do something while this condition is not true" you're saying "Do this until this condition is true."

Same outcome, just makes more sense... but like I said that's just me being nitpicky :P
Nov 6 '07 #2
Thanks for your answer. Changing the code didn't solve the problem. I'm going back in to look at the database connections but I can't imagine how that could be the problem since this exact functionality is working on the other page I referenced. I copied it exactly. <Sigh>
Nov 6 '07 #3

funny to say this..(though no offense meant)..u gave advice of changing a "from" code to "to" code to solve the error..i was having this same error with your "to" code..solved it with your "from" code
Oct 18 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.