Menu

#4 error adding and updating with SQL Server 2000

open
nobody
None
9
2003-09-17
2003-09-16
Phil Tapley
No

I have used Ute successfully in the past but I've come
across a problem I can't get past. I'm connecting to a
SQL Server 2000 database that my web host is providing
and whenever I try to update a record I get the
following message:

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

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
Incorrect syntax near '#'.

/ssl/admin/ute/ute_class_form.inc, line 438 "

Whenever I try to add a new record I get:

"Multiple-step OLE DB operation generated errors. Check
each OLE DB status value, if available. No work was
done."

I have tried connecting both via DSN and DSN-less. I
can view the database no problem and I don't get this
problem on my local development SQL server.

Discussion

  • Phil Tapley

    Phil Tapley - 2003-09-17
    • priority: 5 --> 9
     
  • martek01

    martek01 - 2006-02-03

    Logged In: YES
    user_id=1173611

    I'm having the same trouble. Here is the output:

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
    Incorrect syntax near '-'.

    [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s)
    could not be prepared.

    Multiple-step OLE DB operation generated errors. Check each
    OLE DB status value, if available. No work was done.

    Evans Martin

     
  • Yaniv

    Yaniv - 2006-09-30

    Logged In: YES
    user_id=1610101

    Very similar problem here (I do not know which SQL Server
    I'm using, it's a commercial host)

    --

    Microsoft JET Database Engine error '80040e14'

    Syntax error (missing operator) in query expression 'mail =
    mail@mail.abc'.

    /login/admin/ute/ute_class_form.inc, line 437

     
  • wildboy85

    wildboy85 - 2007-01-11

    Logged In: YES
    user_id=1098420
    Originator: NO

    i added a few line to support sql 2000 and microsoft msde

    ute_class_form.inc
    line 66
    if instr(lcase(ssql),"select *")<>0 then
    '=== this one i removed i change all my datetime to strings, too many bugs
    'if instr(ssql,"#")<>0 then ssql = replace(ssql,"#","'")
    if instr(ssql,"= '")<>0 then ssql = replace(ssql,"= '","like '")
    end if

    must change all comparative "=" to "like"
    and "#" to "'"

     
  • wildboy85

    wildboy85 - 2007-01-11

    Logged In: YES
    user_id=1098420
    Originator: NO

    here is a few modif to define a comparaison sign for sql 2000

    i did not correct the datetime update bug yet, coming with that later

    ute_class.inc

    line 71
    '=== start wildboy85 modif
    private m_ssqlcmp 'comparator operator for sql and msde (not mysql)
    private m_sdatsep 'separator for datatime format
    '=== end wildboy85 modif

    line 132

    '=== start wildbot85

    '=== sqlcmp sql comparator
    Property Let sqlcmp(s)
    m_ssqlcmp = s
    End Property

    Property Get sqlcmp()
    sqlcmp = m_ssqlcmp
    End Property
    '=== datetime separator
    Property Let datsep(s)
    m_sdatsep = s
    End Property

    Property Get datsep()
    datsep = m_sdatsep
    End Property

    '=== end wildboy85

    ute.asp
    line 51

    '=== start wildboy85
    'ute.sqlcmp = "=" '=== for mysql
    ute.sqlcmp = "LIKE" '=== for msde or sql 2000
    ute.datsep = "'"
    '=== end wildboy85

    ute_class_Form.inc
    line 60
    '=== start wildboy85
    'sSQL = sSQL & AddWhere (sField, nType, sValue, "=", "AND", bFirst)
    sSQL = sSQL & AddWhere (sField, nType, sValue, m_Ssqlcmp, "AND", bFirst)
    '=== end wildboy85

     

Log in to post a comment.