[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

ADODB.Recordset 3001 Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another

Asked by lnshop in Microsoft Visual Interdev

Tags: wrong, arguments

Experts:  I am still attempting to add more than 255 characters to a memo field in Foxpro 6.0.  

I am now getting the message above.  Here is the entire inssert and update query code.
sub AddRecord
set insconn=server.CreateObject("ADODB.Connection")
set insrs=server.CreateObject("ADODB.Recordset")
insconn.Open "DSN=ifis"
InsQry="Insert into change_requestrev1 (track_no, subject, req_date, initiator, eff_date, req_desc, bus_value, progrun, progname, t_details, back_plan, risks, app_date, app_by, recommend, comp_date) values ("
InsQry=InsQry & "" & formatnumber(int(trim(Request.Form("strRecNo"))),0,0,0,0) & ",'"
InsQry=insQry & Replace(trim(Request.Form("subject")), "'", "''") &"',"
InsQry=InsQry & "{^" & cstr(year(cdate(Request.Form("req_date")))) & "-" & cstr(month(cdate(Request.Form("req_date")))) & "-" & cstr(day(cdate(Request.Form "req_date"))))  "},'"
InsQry=insQry & Replace(trim(Request.Form("initiator")), "'", "''") & "',"
InsQry=InsQry & "{^" & cstr(year(cdate(Request.Form("eff_date")))) & "-" & cstr(month(cdate(Request.Form("eff_date")))) & "-" & cstr(day(cdate(Request.Form("eff_date")))) "},'"
if Request.form("eff_date")="" then
InsQry=InsQry & "CTOD('//'),'"
end if

**THIS WILL BREAK UP THE LONG STRING IF MORE THAN 200 CHARACTERS ARE ENTERED**

if len(Request.form("req_desc"))>200 then
Workstring=mid(Request.form("req_desc"), 201, len(Request.form("req_desc")))
req_desc=Replace(Mid(Request.Form("req_desc"), 1, 200), "'", "''")
InsQry=insQry & Replace(Mid(Request.Form("req_desc"), 1, 200), "'", "''") & "','"
else
req_desc=Replace(Request.Form("req_desc"), "'", "''")
InsQry=insQry & Replace(trim(Request.Form("req_desc")), "'", "''") & "','"
end if
InsQry=insQry & Replace(trim(Request.Form("bus_value")), "'", "''") & "',"
      if Request.Form ("progrun")="True" then
            InsQry=InsQry & ".T.,'"
      end if
      if Request.Form ("progrun")="False" then
            InsQry=InsQry & ".F.,'"
      end if
      if Request.Form ("progrun")="" then
            InsQry=InsQry & ".F.,'"
      end if
InsQry=insQry & Replace(trim(Request.Form("progname")), "'", "''") & "','"
InsQry=insQry & Replace(trim(Request.Form("t_details")), "'", "''") & "','"
InsQry=insQry & Replace(trim(Request.Form("back_plan")), "'", "''") & "','"
InsQry=insQry & Replace(trim(Request.Form("risks")), "'", "''") & "',"
InsQry=InsQry & "{^" & cstr(year(cdate(Request.Form("app_date")))) & "-" & cstr(month(cdate(Request.Form("app_date")))) & "-" & cstr(day(cdate(Request.Form("app_date")))) &"},'"
if Request.form("app_date")="" then
InsQry=InsQry & "CTOD('//'),'"
end if
InsQry=insQry & Replace(trim(Request.Form("app_by")), "'", "''")      & "','"
InsQry=insQry & Replace(trim(Request.Form("recommend")), "'", "''") &"',"
InsQry=InsQry & "{^" & cstr(year(cdate(Request.Form("comp_date")))) & "-" & cstr(month(cdate(Request.Form("comp_date")))) & "-" & cstr(day(cdate(Request.Form("comp_date")))) &"})"
if Request.form("comp_date")="" then
InsQry=InsQry & "CTOD('//'))"
end if
Response.Write "<br>"
Insrs.open insconn.Execute(InsQry)

Response.Write insQry
Response.Write "<br>"
Response.Write "This is req_desc " & req_desc & "<br>"
Response.Write "The WorkString is " & WorkString
*** END OF INSERT ***

***UPDATE IF REQ_DESC IS LONGER THAN 200 CHARS ***
if WorkString<>"" then
set connA=server.CreateObject("ADODB.Connection")
set rsA=server.CreateObject("ADODB.Recordset")
connA.Open "DSN=ifis"
if err then
response.Write err.Source
Response.Write err.Number
Response.Write err.Description
End if

sql4="Update change_requestrev1 set req_desc=" & "'" & req_desc + Workstring & "'"
sql4=sql4 & " where change_requestrev1.track_no=" & strTrackNo & ""

I have tried both these methods but still get the same error
'rsA.Open connA.Execute(sql4)
rsA.Open connA.Execute(sql4),,adOpenDynamic, adLockOptimistic

Response.Write sql4
end if
end sub
Any help would be greatly appreciated.
[+][-]09/01/05 11:48 AM, ID: 14804880Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/01/05 12:44 PM, ID: 14805375Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/01/05 02:25 PM, ID: 14806071Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/29/05 05:58 PM, ID: 14989073Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09/30/05 08:05 AM, ID: 14992962Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/30/05 08:13 AM, ID: 14993059Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/03/05 10:15 PM, ID: 15011664Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/10/05 11:36 AM, ID: 15054405Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Visual Interdev
Tags: wrong, arguments
Sign Up Now!
Solution Provided By: PAQ_Man
Participating Experts: 2
Solution Grade: A
 
[+][-]10/17/05 08:42 AM, ID: 15100475Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/17/05 12:30 PM, ID: 15102316Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/17/05 12:33 PM, ID: 15102345Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81