The transact code is type of INT but I still get this message.
Microsoft VBScript runtime error '800a000d'
Type mismatch
/empportal/AdminEmailConfi
the SQL statement is line 33
Main Topics
Browse All TopicsPlease help me find where my type mismatch is....
See code below...
The conn information has been intentionally removed for security reasons.
The error is happening at the SQL statement.*
the * is NOT an error but a locator to tell you where the type mismatch is....
I've done the Response.Writes and found that the strEmails() is passing the value I need. It's the VERY NEXT LINE: sql(i).... that the Type Mismatch occurs.
Thanks.
Peter
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The code loops through the Number of Roles which right now is 6. But I did a ReDIM because I wanted to handle the Array Bound dynamically if the roles in the database table ever increase. I didn't want to have to 'Hard-code' a "6". The for next loop needs to be there. In the previous page, I grab the MAXVAL of the roles table and pass it to this page and use it as noOfRoles variable.
Does that make sense?
Peter
So youre convinced that the error is not getting in the following line any more?
*sql(i) = "UPDATE hr_dist_list SET email_dist_list = '" & strEmails(i) & "' WHERE transact_code = 1
But instead 1 one of the following?
sql(i) = "UPDATE hr_dist_list SET user_updated = '" & Session("USERNAME") & "'"
sql(i) = sql(i) & " WHERE transact_code = 1 AND role_id = '" & noOfRoles & "'"
Well, it's this line.... only. It never makes it to the WHERE clause.
sql(i) = "UPDATE hr_dist_list SET user_updated = '" & Session("USERNAME") & "'"
I've never seen anything like this... it's driving me insane....not really but you get the point.
Furthermore, what you see above works in other code I've written for this same application.
This produces a type mismatch... it's CRAZY!!!!!!!!!
For i = 1 to noOfRoles
strEmails(i) = objUpload.Fields("email_di
'Response.Write(strEmails(
sql(i) = "UPDATE hr_dist_list SET email_dist_list = 'A@sdf.com', date_updated = '01/01/2009', user_updated = 'bsmith'"
sql(i) = sql(i) & " WHERE transact_code = 1 AND role_id = '" & noOfRoles & "'"
Response.Write(sql(i))
'conn.Execute sql(i)
Next
Business Accounts
Answer for Membership
by: carrzkissPosted on 2009-07-29 at 18:04:35ID: 24975962
Try this
sql(i) = "UPDATE hr_dist_list SET email_dist_list = '" & strEmails(i) & "' WHERE transact_code = "1""
(Assuming that transcode is of Type Int (Number))
Carrzkiss