Results 1 to 3 of 3

Thread: Error 80040E09(-2147217911)

  1. #1
    Jeff Guest

    Error 80040E09(-2147217911)


    I get the following message when I try to use Sybase driver.

    Error # (Get_RS_GetCount - After open CountSQL) = 80040E09(-2147217911)
    Description = [MERANT][ODBC Sybase ASE driver][SQL Server]Incorrect syntax near '['.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 42000
    Native Error = 102


    However, if I use sql driver to connect to a sql server, it displays all the table and goes to the edit page.

    Piece of code:

    Source Code for: /apps/mh-pro-wildcard.asp

    <% response.buffer=true %>
    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-PRO WildCard </title>


    </HEAD>

    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <%
    Set MyDb = Server.CreateObject(&#34;ASP.db&#34
    mydb.dbDBType =&#34;Sybase&#34;
    mydb.dbdsn = &#34;DSN=xyz;UID=abc;PWD=wow;&#34;
    MyDb.dbUnit = 1113
    B=Request(&#34;ASPdbBut_1113&#34 &#39; this is NOT case sensitive
    L9=Left(B,9)
    UL9=UCASE(L9)
    L12=Left(B,12)
    UL12=UCASE(L12)
    if UL9 <> &#34;ASPDBEDIT&#34; then
    response.write(&#34;<CENTER><B>Welcome to the ASP-db™ PRO Wildcard Edit Demo Page.</B><P>&#34
    response.write(&#34;<HR WIDTH=66% SIZE=1>&#34
    end if

    if UL12 = &#34;ASPDBEDITUPD&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=Black><B>&#34;
    MSG1 = MSG1 + &#34;Please Update the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITDEL&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to DELETE all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITEDI&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to EDIT all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    &#39;Mydb.dbMDB = Server.MapPath(&#34;db8.mdb&#34
    MyDb.dbSQL = &#34;*&#34;

    MyDb.DBColor = &#34;6&#34;
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.DbMode = &#34;dual-horiz&#34;
    MyDb.dbGridInc = 10
    MyDb.dbButtonAnchor=false

    TABNAME = Session(&#34;ALLTABLESQL_1113&#34
    if TABNAME=&#34;CarList&#34; then
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1,TableTag=BORDER=2&#34;
    else
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1+2,TableTag=BORDER=2&#34;
    end if
    MyDb.dbEditParams=EP
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EP = &#34; & EP & &#34;<P>&#34

    EF = Session(&#34;flds&#34
    MyDb.dbEditFlds = EF
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EF = &#34; & EF & &#34;<P>&#34

    MyDb.dbEditUpdateROFlds = &#34;0&#34; &#39; don&#39;t allow auto-numbered flds to be edited

    MyDb.dbTables = &#34;8&#34;
    MyDb.dbOptions = &#34;CellFontTag=Size=2,Heading=<P>Now viewing Table: #TableName#<P>&#34;

    MyDb.dbImageDir=&#34;../images/&#34;
    Mydb.dbNavigation=&#34;top&#34;
    Mydb.dbNavigationItem=&#34;Next, Prev, Gridrow, update&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.ASPdb

    &#39; Create the list of fields to get edited
    flds = &#34;0,&#34; &#39; show fld 0 but make it read-only
    for i = 1 to session(&#34;SV_FieldCount_1113&#34 - 1
    flds = flds & i & &#34;,&#34;
    next
    session(&#34;flds&#34 = flds

    %>


    </BODY>
    </HTML>



    Click Here to return to /apps/mh-pro-wildcard.asp

  2. #2
    Frank Kwong Guest

    Error 80040E09(-2147217911) (reply)



    Looks like space in name problem ->

    1. try the same thing with no space in fieldnames.
    2. If works then contact me and I&#39;ll make adjustment s fo ryour aprticular DB.

    FK

    ------------
    Jeff at 11/9/01 9:23:11 AM


    I get the following message when I try to use Sybase driver.

    Error # (Get_RS_GetCount - After open CountSQL) = 80040E09(-2147217911)
    Description = [MERANT][ODBC Sybase ASE driver][SQL Server]Incorrect syntax near &#39;[&#39;.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 42000
    Native Error = 102


    However, if I use sql driver to connect to a sql server, it displays all the table and goes to the edit page.

    Piece of code:

    Source Code for: /apps/mh-pro-wildcard.asp

    <% response.buffer=true %>
    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-PRO WildCard </title>


    </HEAD>

    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <%
    Set MyDb = Server.CreateObject(&#34;ASP.db&#34
    mydb.dbDBType =&#34;Sybase&#34;
    mydb.dbdsn = &#34;DSN=xyz;UID=abc;PWD=wow;&#34;
    MyDb.dbUnit = 1113
    B=Request(&#34;ASPdbBut_1113&#34 &#39; this is NOT case sensitive
    L9=Left(B,9)
    UL9=UCASE(L9)
    L12=Left(B,12)
    UL12=UCASE(L12)
    if UL9 <> &#34;ASPDBEDIT&#34; then
    response.write(&#34;<CENTER><B>Welcome to the ASP-db™ PRO Wildcard Edit Demo Page.</B><P>&#34
    response.write(&#34;<HR WIDTH=66% SIZE=1>&#34
    end if

    if UL12 = &#34;ASPDBEDITUPD&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=Black><B>&#34;
    MSG1 = MSG1 + &#34;Please Update the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITDEL&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to DELETE all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITEDI&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to EDIT all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    &#39;Mydb.dbMDB = Server.MapPath(&#34;db8.mdb&#34
    MyDb.dbSQL = &#34;*&#34;

    MyDb.DBColor = &#34;6&#34;
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.DbMode = &#34;dual-horiz&#34;
    MyDb.dbGridInc = 10
    MyDb.dbButtonAnchor=false

    TABNAME = Session(&#34;ALLTABLESQL_1113&#34
    if TABNAME=&#34;CarList&#34; then
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1,TableTag=BORDER=2&#34;
    else
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1+2,TableTag=BORDER=2&#34;
    end if
    MyDb.dbEditParams=EP
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EP = &#34; & EP & &#34;<P>&#34

    EF = Session(&#34;flds&#34
    MyDb.dbEditFlds = EF
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EF = &#34; & EF & &#34;<P>&#34

    MyDb.dbEditUpdateROFlds = &#34;0&#34; &#39; don&#39;t allow auto-numbered flds to be edited

    MyDb.dbTables = &#34;8&#34;
    MyDb.dbOptions = &#34;CellFontTag=Size=2,Heading=<P>Now viewing Table: #TableName#<P>&#34;

    MyDb.dbImageDir=&#34;../images/&#34;
    Mydb.dbNavigation=&#34;top&#34;
    Mydb.dbNavigationItem=&#34;Next, Prev, Gridrow, update&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.ASPdb

    &#39; Create the list of fields to get edited
    flds = &#34;0,&#34; &#39; show fld 0 but make it read-only
    for i = 1 to session(&#34;SV_FieldCount_1113&#34 - 1
    flds = flds & i & &#34;,&#34;
    next
    session(&#34;flds&#34 = flds

    %>


    </BODY>
    </HTML>



    Click Here to return to /apps/mh-pro-wildcard.asp

  3. #3
    Jeff Guest

    Error 80040E09(-2147217911)

    The tables doesn&#39;t have spade in fieldnames. But they have hypens in the field names. Does that make some difference. Moreover, the same things works for MSSQL database.


    ------------
    Frank Kwong at 11/13/2001 7:40:52 PM



    Looks like space in name problem ->

    1. try the same thing with no space in fieldnames.
    2. If works then contact me and I&#39;ll make adjustment s fo ryour aprticular DB.

    FK

    ------------
    Jeff at 11/9/01 9:23:11 AM


    I get the following message when I try to use Sybase driver.

    Error # (Get_RS_GetCount - After open CountSQL) = 80040E09(-2147217911)
    Description = [MERANT][ODBC Sybase ASE driver][SQL Server]Incorrect syntax near &#39;[&#39;.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 42000
    Native Error = 102


    However, if I use sql driver to connect to a sql server, it displays all the table and goes to the edit page.

    Piece of code:

    Source Code for: /apps/mh-pro-wildcard.asp

    <% response.buffer=true %>
    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-PRO WildCard </title>


    </HEAD>

    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <%
    Set MyDb = Server.CreateObject(&#34;ASP.db&#34
    mydb.dbDBType =&#34;Sybase&#34;
    mydb.dbdsn = &#34;DSN=xyz;UID=abc;PWD=wow;&#34;
    MyDb.dbUnit = 1113
    B=Request(&#34;ASPdbBut_1113&#34 &#39; this is NOT case sensitive
    L9=Left(B,9)
    UL9=UCASE(L9)
    L12=Left(B,12)
    UL12=UCASE(L12)
    if UL9 <> &#34;ASPDBEDIT&#34; then
    response.write(&#34;<CENTER><B>Welcome to the ASP-db™ PRO Wildcard Edit Demo Page.</B><P>&#34
    response.write(&#34;<HR WIDTH=66% SIZE=1>&#34
    end if

    if UL12 = &#34;ASPDBEDITUPD&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=Black><B>&#34;
    MSG1 = MSG1 + &#34;Please Update the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITDEL&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to DELETE all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    if UL12 = &#34;ASPDBEDITEDI&#34; then
    MSG1 = &#34;<CENTER><FONT SIZE=4 COLOR=red><B>&#34;
    MSG1 = MSG1 + &#34;You are about to EDIT all of the Information for: &#34;
    MSG1 = MSG1 + &#34;</B></FONT><P>&#34;
    response.write(MSG1)
    end if

    &#39;Mydb.dbMDB = Server.MapPath(&#34;db8.mdb&#34
    MyDb.dbSQL = &#34;*&#34;

    MyDb.DBColor = &#34;6&#34;
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.DbMode = &#34;dual-horiz&#34;
    MyDb.dbGridInc = 10
    MyDb.dbButtonAnchor=false

    TABNAME = Session(&#34;ALLTABLESQL_1113&#34
    if TABNAME=&#34;CarList&#34; then
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1,TableTag=BORDER=2&#34;
    else
    EP=&#34;TableName=&#34; & TABNAME & &#34;,BookMarkFlds=0+1+2,TableTag=BORDER=2&#34;
    end if
    MyDb.dbEditParams=EP
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EP = &#34; & EP & &#34;<P>&#34

    EF = Session(&#34;flds&#34
    MyDb.dbEditFlds = EF
    if UL9 = &#34;ASPDBEDIT&#34; then response.write(&#34;EF = &#34; & EF & &#34;<P>&#34

    MyDb.dbEditUpdateROFlds = &#34;0&#34; &#39; don&#39;t allow auto-numbered flds to be edited

    MyDb.dbTables = &#34;8&#34;
    MyDb.dbOptions = &#34;CellFontTag=Size=2,Heading=<P>Now viewing Table: #TableName#<P>&#34;

    MyDb.dbImageDir=&#34;../images/&#34;
    Mydb.dbNavigation=&#34;top&#34;
    Mydb.dbNavigationItem=&#34;Next, Prev, Gridrow, update&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.ASPdb

    &#39; Create the list of fields to get edited
    flds = &#34;0,&#34; &#39; show fld 0 but make it read-only
    for i = 1 to session(&#34;SV_FieldCount_1113&#34 - 1
    flds = flds & i & &#34;,&#34;
    next
    session(&#34;flds&#34 = flds

    %>


    </BODY>
    </HTML>



    Click Here to return to /apps/mh-pro-wildcard.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •