Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Error Inserting a record

Posted 19 Aug 2006 22:35:13
1
has voted
19 Aug 2006 22:35:13 ASP Oracle posted:
Hi All,

I am getting an error at line: InsertCommand.Execute(). The error is "Error Type: ADODB.Connection.1 (0x80004005) SQLState: S0002 Native Error Code: 942 [DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-00942: table or view does not exist"

Please note when I do a Response.Write(InsertCommand.CommandText) and then copy paste the query in SQL Plus, I don't get any errors and am able to insert a row in the table without any issues! I have verified the existence of the connection by connecting to a table in schema AAB$ZNS and printing the contents of that table on a webpage.

Also, I have tried to execute the code below both with InsertConnection.Execute and InsertCommand.Execute and I get the same error.

<%
Dim InsertConnection, InsertCommand

Set InsertConnection = Server.CreateObject("ADODB.Connection"
InsertConnection.Open "aab"
Set InsertCommand = Server.CreateObject("ADODB.Command"
Set InsertCommand.ActiveConnection = InsertConnection
InsertCommand.CommandType = 1
InsertCommand.CommandTimeout=30
InsertCommand.Prepared = True

InsertCommand.CommandText="INSERT INTO AAB$ZNS.ALL_INTEREST VALUES ("& _
"'" & Quotify(trim(request.Form("lastName")) & "', '" & Quotify(trim(request.Form("firstName")) & "', '" & Quotify(trim(request.Form("middleInitial")) & "')"

InsertCommand.Execute()

%>


Your HELP will be highly appreciate as I need to turn the working code in by tomorrow (Sunday).

Thanks,
Harry

Reply to this topic