Professional Web Applications Themes

ODBC insert problems in ASP.NET C# - Dreamweaver AppDev

Hi All, I am having a bit of trouble inserting and updating into an acces database using the Dreamweaver MX 2004 functions. It works fine reading, inserting and updating into Oracle and SQL Server but not Access?? I have the same problem when I tested it in ASP. Dreamweaver is fully updated and has the correct patches for the .net sp2 problems. Any help gratefully received. Cheers...

  1. #1

    Default ODBC insert problems in ASP.NET C#

    Hi All,
    I am having a bit of trouble inserting and updating into an acces database
    using the Dreamweaver MX 2004 functions.

    It works fine reading, inserting and updating into Oracle and SQL Server but
    not Access??

    I have the same problem when I tested it in ASP.

    Dreamweaver is fully updated and has the correct patches for the .net sp2
    problems.

    Any help gratefully received.
    Cheers

    Jimbo_Bimbo Guest

  2. #2

    Default Re: ODBC insert problems in ASP.NET C#

    What specific issue are you having (ie what error message is being
    returned).

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Jimbo_Bimbo" <webforumsusermacromedia.com> wrote in message
    news:d4rdug$hfk$1forums.macromedia.com...
    > Hi All,
    > I am having a bit of trouble inserting and updating into an acces
    database
    > using the Dreamweaver MX 2004 functions.
    >
    > It works fine reading, inserting and updating into Oracle and SQL Server
    but
    > not Access??
    >
    > I have the same problem when I tested it in ASP.
    >
    > Dreamweaver is fully updated and has the correct patches for the .net sp2
    > problems.
    >
    > Any help gratefully received.
    > Cheers
    >

    Paul Whitham TMM Guest

  3. #3

    Default Re: ODBC insert problems in ASP.NET C#

    Hi Paul,
    I get this error:

    System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
    at
    System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
    dbParams, Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
    Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
    behavior, String method)
    at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
    at DreamweaverCtrls.DataSet.DoInit()

    There is no sytax error in sql statement it is only a simple insert statement.

    Thanks for the help,

    Jamie

    Jimbo_Bimbo Guest

  4. #4

    Default Re: ODBC insert problems in ASP.NET C#

    Jamie

    Syntax errors normally come from the following

    1) Having a database field with a reserved name (such as Name, Desc,
    Password)
    2) Trying to insert a text value into a numeric field

    The latter one can happen if a person enters a comma or a dollar sign in the
    input field.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Jimbo_Bimbo" <webforumsusermacromedia.com> wrote in message
    news:d565s3$4gm$1forums.macromedia.com...
    > Hi Paul,
    > I get this error:
    >
    > System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
    > at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32
    hr)
    > at
    >
    System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
    > dbParams, Object& executeResult)
    > at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&
    executeResult)
    > at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior
    behavior,
    > Object& executeResult)
    > at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
    > behavior, String method)
    > at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
    > at DreamweaverCtrls.DataSet.DoInit()
    >
    > There is no sytax error in sql statement it is only a simple insert
    statement.
    >
    > Thanks for the help,
    >
    > Jamie
    >

    Paul Whitham TMM Guest

  5. #5

    Default Re: ODBC insert problems in ASP.NET C#

    Hi Paul,
    Thanks for that I will give it a go,
    The thing that confuses me is it works fine with an SQL database and all the
    names of the tables and fields are exatcly the same - its just with access -
    but it is a valid point.

    I will get back to you when I have tested it,

    Cheers,
    Jamie

    Jimbo_Bimbo Guest

  6. #6

    Default Re: ODBC insert problems in ASP.NET C#

    Hi Paul,
    I have sorted the problem - It was a simple security problem with access - I am not used to using access - it is RUBBISH!

    Thanks for your help.

    Jamie
    Jimbo_Bimbo Guest

Similar Threads

  1. #40452 [NEW]: ODBC and SQL Server datetime parameter fields fail on insert
    By aspen dot olmsted at alliance dot biz in forum PHP Bugs
    Replies: 9
    Last Post: April 24th, 07:05 PM
  2. Insert ODBC Date time values
    By TheToe in forum Coldfusion Database Access
    Replies: 0
    Last Post: December 12th, 10:08 PM
  3. odbc insert null error
    By bflophil in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: February 18th, 10:09 PM
  4. #13966 [Com]: insert id function for ODBC
    By seang at moosecat dot com dot au in forum PHP Development
    Replies: 0
    Last Post: August 4th, 11:28 AM
  5. ASP/ODBC Problems
    By Luke Zhang [MSFT] in forum ASP Database
    Replies: 0
    Last Post: June 30th, 01:59 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139