oledb write to oracle db [message #99699] |
Sat, 23 February 2002 06:56 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Jim Tucker
Messages: 2 Registered: February 2002
|
Junior Member |
|
|
Hi:
I have a Win2K server, Oracle 8i. I borrowed a script and modified it to write to the database from a web form, found that I need to use client-side cursor. In trying to do that, I get the error below. I would appreciate any tips or pointers, especially if I am going in the wrong direction, or should be using other tools. The script...
<%
Response.Buffer = true
dim cnn,rst,DSN
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
DSN = "Provider=MSDAORA.1;Password=manager;User ID=system;Data
Source=sercon"
cnn.Open DSN
sqltext = "SELECT * FROM tbl1"
rst.CursorLocation = adUseClient
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open sqltext,cnn,3,3
rst.AddNew
rst("t1") = Request.Form("t1")
rst("r1") = Request.Form("r1")
rst("c1") = Request.Form("c1")
rst("dd1") = Request.Form("dd1")
rst("st") = Request.Form("st")
rst.update
rst.Close
Set rst= Nothing
cnn.close
Set cnn= Nothing
Response.Redirect "./default.htm"
%>
But I get the error:
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are
in conflict with one another.
/gotodb.asp, line 9
Thanks in advance for any assistance you can offer
|
|
|
Re: oledb write to oracle db [message #99700 is a reply to message #99699] |
Sat, 23 February 2002 06:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Jim Tucker
Messages: 2 Registered: February 2002
|
Junior Member |
|
|
<%
Response.Buffer = true
dim cnn,rst,DSN
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
DSN = "Provider=MSDAORA.1;Password=manager;User ID=system;Data
Source=sercon"
cnn.Open DSN
sqltext = "SELECT * FROM tbl1"
rst.CursorLocation = adUseClient
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open sqltext,cnn,3,3
rst.AddNew
rst("t1") = Request.Form("t1")
rst("r1") = Request.Form("r1")
rst("c1") = Request.Form("c1")
rst("dd1") = Request.Form("dd1")
rst("st") = Request.Form("st")
rst.update
rst.Close
Set rst= Nothing
cnn.close
Set cnn= Nothing
Response.Redirect "./default.htm"
%>
|
|
|
Re: oledb write to oracle db [message #99702 is a reply to message #99699] |
Sat, 23 February 2002 19:16 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Befeo
Messages: 4 Registered: February 2002
|
Junior Member |
|
|
You have to justify each file attribute individually for the form, and when it is in your format make a file of those attributes for the database.
attributes are eg., char(length),
integer ((-)35000 - (+)35000),
long int (-million - + million)
unsigned int (1-70,000)
Date
Time
Boolean (True or False)
Work with each piece of software and make file definitions using (new file) command. Compare their compatibility starting simply with a Boolean value, or a short string (6 characters).
Get a book on any programming language, because the data is in the same format as it is for programs, which is what thosae software messages mean to me ...
|
|
|