Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

I have a webpage that accepts some info and feeds it to a table in a SQL server 2005 database. This works fine on SQL server 2000. But it gives me following error when I accept all the info -

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][SQL Native Client][SQL Server]Inserts, updates & deletes are not permitted from Internet Information

C:\WEB\HELP_DESK\../ado/ado_start.inc, line 7

This is the ado_start.inc code -

<%'SET UP ACTIVEX DATA OBJECT
set my_conn = server.createobject("adodb.connection")
set my_rows = server.createobject("adodb.recordset")
my_conn.open "Driver={SQL Native Client};Server=mmdckvm4;Database=work_force;UID=mab_help_desk;PWD=thepike;"
my_rows.open sql, my_conn
app = "" %>
0
ariesmeeta
Asked:
ariesmeeta
  • 3
  • 2
1 Solution
 
assystCommented:
Change the connection string as below and try

my_conn.open "Provider=SQLNCLI;Server=mmdckvm4;Database=work_force;UID=mab_help_desk;PWD=thepike;"

Good Luck

0
 
ariesmeetaAuthor Commented:
hi assyst:
then i get the following error -

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/help_desk/help_desk_insert.inc, line 19
0
 
ariesmeetaAuthor Commented:
This is the help_desk_insert.inc

<%
'SET POINTER TO HOURGLASS
mousepointer = 11

'BYPASS INSERT AND UPDATE(S)  ??
disp = 0
if disp = 0 then

'INSERT STARTS HERE
app = app1
sql = "help_desk_insert " & null_q(badge) & "," & null_q(category) & ","
sql = sql & null_q(node_name) & "," & null_q(some_user)

%>
<!--#include file="../ado/ado_start.inc" -->
<%

'GET support.ref OF NEWLY INSERTED ROW TO UPDATE REMAINING FIELDS
ref=my_rows(0)

%>

<!--#include file="../ado/ado_end.inc" -->

<!-- BEGIN: STUFF THAT USED TO BE IN "help_desk_description.inc" -->

<%

'PREPARE TO UPDATE BIG AND OTHER COLUMNS
app = app1
sql =      "select description, description2, description3, description4, " & _
      "profile_problem, inventory_problem, user_comment, ces_beep, subject, status " & _
      "from support where ref = " & ref
%>

<!--#include file="../ado/ado_start_update.inc" -->

<%

'SET THE DESCRIPTION FIELDS FOR THE UPDATE
my_rows(0) = mid(description,1,255)
my_rows(1) = mid(description,256,255)
my_rows(2) = mid(description,511,255)
'my_rows(3) = mid(description,766,255)
my_rows(3) = contactemail

'SET ADDITIONAL FIELDS FOR THE UPDATE (02/10/2000 DPH)
if len(trim(profile_problem)) > 0 then
      my_rows(4) = profile_problem
end if
if len(trim(inventory_problem)) > 0 then
      my_rows(5) = inventory_problem
end if
if len(trim(user_comment)) > 0 then
      my_rows(6) = user_comment
end if
if beeper = "on" or beeper = "1" then
      my_rows(7) = "1"
end if

'SET SUBJECT AND STATUS
my_rows(8) = subject
my_rows(9) = "1"

'DO THE UPDATE
my_rows.update

%>

<!--#include file="../ado/ado_end.inc" -->

<!-- END: STUFF THAT USED TO BE IN "help_desk_description.inc" -->

<%

'SET MOUSE BACK TO NORMAL
end if

mousepointer = 0

%>
0
 
assystCommented:
Hi,

>>>ADODB.Recordset error '800a0cc1'

>>>Item cannot be found in the collection corresponding to the requested name or ordinal.

This error is not related to the connection.
The connection is a success now..

Check the Code and find out whether a colun name not in the select statement is used..

i suspect
"my_rows(3) = contactemail"
which is not there in the select query

This error is coming because you are using a invalid column in your code..

Pls check

Good Luck
0
 
ariesmeetaAuthor Commented:
hi Assyst
Thanks for the first solution. I have accepted it. I will open second question for this to continue. In the meantime, I ran the SQL profiler. This code runs perfectly on SQL 2000 but it gives me this error now in 2005.  I will post detailed and new question by end of the day.
Thanks,
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now