Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: ASP Help Arguments are of the wrong type


Message #1 by "Justin Setliffe" <jsetliffe@h...> on Fri, 31 Aug 2001 14:03:46
I am trying to update a feild in my database with a data that has been 

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.







What am I doing wrong???





Message #2 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 10:31:33 -0500
Assign the CommandText to a variable and do a Response.Write of the

CommandText.  Paste this into the SQL View in the Access query designer to

see if Access will find the error for you.  This will usually help you solve

the problem.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...



 



-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 9:24 AM

To: ASP Databases

Subject: [asp_databases] ASP Help Arguments are of the wrong type





I am trying to update a feild in my database with a data that has been 

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.





What am I doing wrong???

Message #3 by "Justin Setliffe" <jsetliffe@h...> on Fri, 31 Aug 2001 16:19:06
Well here is my code that when I paste it into Access works(the SQL part):



<!-- include file = "connect1.asp" -->

<%

	Dim objCmd, date, batch

	date = Request.Form("Pickup")

	Set objCmd = Server.CreateObject("ADODB.Command")

	strSQL = "UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		     "WHERE BatchNumber LIKE '" & Session("Batch") & "';"

	Response.Write strSQL

	objCmd.CommandText = strSQL

	objCmd.CommandType = adCmdText

	Set objCmd.ActiveConnection = strConnect

	objCmd.Execute



Response.Redirect "Company.asp"

%>



But I am getting this error when I try and run it from my web page:



UPDATE Checks2 SET PickupDate = #11/12/2003# WHERE BatchNumber LIKE 'IKR1';



ADODB.Command error '800a0bb9'



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

conflict with one another.



/jsetliffe/database/Pickup.asp, line 10



What else am I doing wrong??



From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

To: "ASP Databases" <asp_databases@p...>

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type

Date: Fri, 31 Aug 2001 10:31:33 -0500

>



Assign the CommandText to a variable and do a Response.Write of the

CommandText.  Paste this into the SQL View in the Access query designer to

see if Access will find the error for you.  This will usually help you solve

the problem.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...







-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 9:24 AM

To: ASP Databases

Subject: [asp_databases] ASP Help Arguments are of the wrong type





I am trying to update a feild in my database with a data that has been

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.





What am I doing wrong???





Message #4 by "Drew, Ron" <RDrew@B...> on Fri, 31 Aug 2001 12:32:50 -0400
Is BatchNumber AlphaNumeric?  Also when you use the LIKE normally you either

1.   BatchNumber LIKE 'IKR1%'   starts with IKR

2.   BatchNumber LIKE '%IKR1%'   has IKR in it

3.   BatchNumber LIKE '%IKR1'   ends with IKR



-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 12:19 PM

To: ASP Databases

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type





Well here is my code that when I paste it into Access works(the SQL part):



<!-- include file = "connect1.asp" -->

<%

	Dim objCmd, date, batch

	date = Request.Form("Pickup")

	Set objCmd = Server.CreateObject("ADODB.Command")

	strSQL = "UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		     "WHERE BatchNumber LIKE '" & Session("Batch") & "';"

	Response.Write strSQL

	objCmd.CommandText = strSQL

	objCmd.CommandType = adCmdText

	Set objCmd.ActiveConnection = strConnect

	objCmd.Execute



Response.Redirect "Company.asp"

%>



But I am getting this error when I try and run it from my web page:



UPDATE Checks2 SET PickupDate = #11/12/2003# WHERE BatchNumber LIKE 'IKR1';



ADODB.Command error '800a0bb9'



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

conflict with one another.



/jsetliffe/database/Pickup.asp, line 10



What else am I doing wrong??



From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

To: "ASP Databases" <asp_databases@p...>

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type

Date: Fri, 31 Aug 2001 10:31:33 -0500

>



Assign the CommandText to a variable and do a Response.Write of the

CommandText.  Paste this into the SQL View in the Access query designer to

see if Access will find the error for you.  This will usually help you solve

the problem.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...







-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 9:24 AM

To: ASP Databases

Subject: [asp_databases] ASP Help Arguments are of the wrong type





I am trying to update a feild in my database with a data that has been

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.





What am I doing wrong???
Message #5 by "Justin Setliffe" <jsetliffe@h...> on Fri, 31 Aug 2001 17:12:17
It is alphanumeric, but it's not a piece of something - it's the actual 

value in the field.  If I substitute "=" instead of LIKE I get the same 

error message.





From: "Drew, Ron" <RDrew@B...>

Reply-To: "ASP Databases" <asp_databases@p...>

To: "ASP Databases" <asp_databases@p...>

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type

Date: Fri, 31 Aug 2001 12:32:50 -0400





Is BatchNumber AlphaNumeric?  Also when you use the LIKE normally you either

1.   BatchNumber LIKE 'IKR1%'   starts with IKR

2.   BatchNumber LIKE '%IKR1%'   has IKR in it

3.   BatchNumber LIKE '%IKR1'   ends with IKR



-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 12:19 PM

To: ASP Databases

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type





Well here is my code that when I paste it into Access works(the SQL part):



<!-- include file = "connect1.asp" -->

<%

	Dim objCmd, date, batch

	date = Request.Form("Pickup")

	Set objCmd = Server.CreateObject("ADODB.Command")

	strSQL = "UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		     "WHERE BatchNumber LIKE '" & Session("Batch") & "';"

	Response.Write strSQL

	objCmd.CommandText = strSQL

	objCmd.CommandType = adCmdText

	Set objCmd.ActiveConnection = strConnect

	objCmd.Execute



Response.Redirect "Company.asp"

%>



But I am getting this error when I try and run it from my web page:



UPDATE Checks2 SET PickupDate = #11/12/2003# WHERE BatchNumber LIKE 'IKR1';



ADODB.Command error '800a0bb9'



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

conflict with one another.



/jsetliffe/database/Pickup.asp, line 10



What else am I doing wrong??



From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

To: "ASP Databases" <asp_databases@p...>

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type

Date: Fri, 31 Aug 2001 10:31:33 -0500

 >



Assign the CommandText to a variable and do a Response.Write of the

CommandText.  Paste this into the SQL View in the Access query designer to

see if Access will find the error for you.  This will usually help you solve

the problem.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...







-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 9:24 AM

To: ASP Databases

Subject: [asp_databases] ASP Help Arguments are of the wrong type





I am trying to update a feild in my database with a data that has been

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.





What am I doing wrong???

Message #6 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 12:40:32 -0500
Are you including adovbs.inc?  If not, the message could be generated on the

line:

objCmd.CommandType = adCmdText



Without explicitly defining the value of adCmdText, the compiler will give

this a default value of 0.  0 is not a member of the CommandTypeEnum

enumeration and would error out.  To test this, try using the value

represented by adCmdText (1) instead of the constant:

objCmd.CommandType = 1 'adCmdText



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...





-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 11:19 AM

To: ASP Databases

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type





Well here is my code that when I paste it into Access works(the SQL part):



<!-- include file = "connect1.asp" -->

<%

	Dim objCmd, date, batch

	date = Request.Form("Pickup")

	Set objCmd = Server.CreateObject("ADODB.Command")

	strSQL = "UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		     "WHERE BatchNumber LIKE '" & Session("Batch") & "';"

	Response.Write strSQL

	objCmd.CommandText = strSQL

	objCmd.CommandType = adCmdText

	Set objCmd.ActiveConnection = strConnect

	objCmd.Execute



Response.Redirect "Company.asp"

%>



But I am getting this error when I try and run it from my web page:



UPDATE Checks2 SET PickupDate = #11/12/2003# WHERE BatchNumber LIKE 'IKR1';



ADODB.Command error '800a0bb9'



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

conflict with one another.



/jsetliffe/database/Pickup.asp, line 10



What else am I doing wrong??



From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

To: "ASP Databases" <asp_databases@p...>

Subject: [asp_databases] RE: ASP Help Arguments are of the wrong type

Date: Fri, 31 Aug 2001 10:31:33 -0500

>



Assign the CommandText to a variable and do a Response.Write of the

CommandText.  Paste this into the SQL View in the Access query designer to

see if Access will find the error for you.  This will usually help you solve

the problem.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...







-----Original Message-----

From: Justin Setliffe [mailto:jsetliffe@h...]

Sent: Friday, August 31, 2001 9:24 AM

To: ASP Databases

Subject: [asp_databases] ASP Help Arguments are of the wrong type





I am trying to update a feild in my database with a data that has been

passed from a previous page.  Here is my code:



<!-- include file = "connect1.asp" -->

<%

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")

objCmd.CommandText="UPDATE Checks2 SET PickupDate = #" & date & "# " & _

		   "WHERE BatchNumber LIKE '" & batch & "';"

objCmd.CommandType = adCmdText

Set objCmd.ActiveConnection = strConnect

objCmd.Execute

Set objCmd = Nothing

Response.Redirect "Company.asp"

%>



Here is the error message I am getting:



ADODB.Command error '800a0bb9'



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

conflict with one another.





What am I doing wrong???


  Return to Index