Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error with createparameter code

Status
Not open for further replies.

dminich

Programmer
Mar 7, 2003
15
US
I'm trying to add values from a form to an Oracle database. Here is my asp code.

<%
Dim Conn
set conn = server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Data Source=InternApp;User ID=Intern;Password=intern"
conn.open

set comm = server.CreateObject("ADODB.Command")
set comm.ActiveConnection = conn
comm.commandtype=4

comm.commandtext = "insert_test"

set param = comm.parameters
param.append comm.createparameter("dminich",adVarChar,adParamInput)
comm("dminich") = "tyler"
'param.append comm.createparameter("dminich",3,1)
'comm("dminich") = 852741963
%>

I receive the following error
* Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/InternCtr/InternshipApplication.asp, line 15

Line 15 is param.append comm.createparameter("dminich",adVarChar,adParamInput)

The odd part is the code works fine when I use param.append comm.createparameter("dminich",3,1)
comm("dminich") = 852741963

and comment out the other two lines. What am I doing wrong or missing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top