Advertisement

03.11.2008 at 02:47AM PDT, ID: 23231128
[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!

9.3

ADODB.Command (0x800A0D5D), Cannot have comma's

Asked by raymondmantle in Macromedia Dreamweaver, Active Server Pages (ASP)

Tags: ,

Hi, I am trying to pass variable's to a ADODB.Command, where the variable name's are that same on multi select. I am using Dreamweaver 8.0.2

Below is a example of information being passed.

eg.  strBranchID=1901&strBranchID=1902&strNat=Irish&strNat=Polag&Submit=Submit

This works fine on a Update record / Insert record, but when using a command to build a query, i get the following error.

Error Type:
ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current operation.
/bcollins/level5/blank2.asp, line 23

I am a new to DreamWeaver 8, and cannot seem to find a fix for this, BTW i am new to website desing aswell.

I hvae included the code for both pages and StoredProcedure.

Thanks

Ray

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
<!--This is the page that i have the questions on, and i must be able top select multi answers to each question-->
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/loyaltysqlexpress.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body bgcolor="#FFFFFF">
<form id="strBranchID" name="strBranchID" method="get" action="/bcollins/level5/blank2.asp">
  <p>
    <select name="strBranchID" multiple="multiple" id="strBranchID">
      <option value="1901">Cork</option>
      <option value="1902">Wexford</option>
    </select> 
  Branch</p>
  <p>
    <select name="strNat" multiple="multiple" id="strNat">
      <option value="Irish">Irish</option>
      <option value="Polag">Polag</option>
    </select> 
    Nat
</p>
  <p>
    <input type="submit" name="Submit" value="Submit" />
</p>
</form>
</body>
</html>
<!-- End Of Page-->
 
 
 
<!-- This is the page that has the Command-->
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/loyaltysqlexpress.asp" -->
<%
 
Dim Command1__strBranchID
Command1__strBranchID = ""
if(Request("strBranchID") <> "") then Command1__strBranchID = Request("strBranchID")
 
Dim Command1__strNat
Command1__strNat = ""
if(Request("strNat") <> "") then Command1__strNat = Request("strNat")
 
%>
<%
 
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_loyaltysqlexpress_STRING
Command1.CommandText = "dbo.sp_TEST"
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE", 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@strBranchID", 200, 1,6,Command1__strBranchID)
Command1.Parameters.Append Command1.CreateParameter("@strNat", 200, 1,6,Command1__strNat)
Command1.Execute()
 
%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
</head>
<body bgcolor="#FFFFFF">
<p>Records have been inserted!</p>
<p><%= Request.QueryString("strBranchID") %></p>
<p><%= Request.QueryString("strNat") %></p>
<p>&nbsp;</p>
</body>
</html>
<!-- End of Page -->
 
 
/**** This is the StoredProcedure in SQL *****/
/****** Object:  StoredProcedure [dbo].[sp_TEST]    Script Date: 03/11/2008 09:40:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
 
ALTER PROCEDURE [dbo].[sp_TEST]
@strBranchID varchar (6),
@strNat varchar (6)
AS
 
SET NOCOUNT ON
 
INSERT INTO tblTest (strBranchID, strNat)
	 VALUES (@strBranchID, @strNat)
/**** End of StoredProcedure *****/
[+][-]03.11.2008 at 05:07AM PDT, ID: 21094842

View this solution now by starting your 7-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

Zones: Macromedia Dreamweaver, Active Server Pages (ASP)
Tags: ASP, FireFox
Sign Up Now!
Solution Provided By: _Stilgar_
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628