Skip to main content
Inspiring
August 16, 2007
Question

repost: error with "move to record"

  • August 16, 2007
  • 3 replies
  • 362 views
Hi All,

I posted this in the main DW NG yesterday but as yet havn't had a responce
so forgive me for trying here...

-----------

I have an error which doesn't for some reason always rear it's ugly head.
Basically it's part of the repeat region/move to record functionality of
DreamWeaver 8

The error message is:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Could not find prepared statement with handle -1.

This is the code block:
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery ' this is the offending line
End If

I'm working with ASP vbscript with SQLServer 2005

Does anyone have any ideas what is going on and hopefully a remedy?

Many thanks

Justin



This topic has been closed for replies.

3 replies

Inspiring
August 17, 2007
It's not an insert or edit. Just part of the move next/previous function of
the repeat region behaviour when displaying a recordset.

There aren't even any NULL's in the selection I'm making in the recordset.

this is the post that led me to believe it was to do with the data type:
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic3306.aspx

from searching
www.google.co.uk/search?q=Could+not+find+prepared+statement+with+handle+-1.

Kind of a weird problem as it didn't always happen, you could load the page
and it'd be OK, reload it and and it's error, again and... well you get the
idea...


Inspiring
August 16, 2007
I googled your error
( http://www.google.com/search?q=SQL+Server+error+%2780040e14&ie=utf-8&oe
=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a) and got a
slew of responses. The top one said

... if you try to insert/update a column that does not allow NULL
values, with NULL (e.g. by hard-coding NULL into the statement, or by
leaving a column - that does not have a default value defined - out of
the INSERT list).

So could you have null value somewhere?

Just trying to help

Inspiring
August 16, 2007
no reply so far but I found some hints on the net. Something to do with the
data type or bytes. Couldn't work a solution so...
A work around is to revert to pre "SQL Injection" recordset update what ever
update that was. Essentially use MX recordset. I've not had the error
since...

Would be nice to know what is going on and a proper solution but until
then...