Professional Web Applications Themes

ASP SQLSERVER PROB: - ASP Database

When i try to insert a record into a table 'account' i keep getting this error.. Microsoft OLE DB Provider for SQL Server (0x80040E37) Invalid object name 'account'. It doesn't occur when i issue the select statement..results are returned. cst = "Provider=SQLOLEDB;Data Source=127.0.0.1;Initial Catalog=essential_health;Network=DBMSSOCN; User Id=administrator;Password=password" set cn = CreateObject("ADODB.Connection") cn.open cst Set rs = cn.execute("select * from account") Response.Write("Account: " & rs("account_name") & " Password: " & rs("account_password")) cn.execute("insert into account ('account_name','account_password') VALUES ('administrator','essential')") Help appreciated!! AJ...

Sponsored Links
  1. #1

    Default ASP SQLSERVER PROB:

    When i try to insert a record into a table 'account' i keep getting this
    error..

    Microsoft OLE DB Provider for SQL Server (0x80040E37)
    Invalid object name 'account'.

    It doesn't occur when i issue the select statement..results are returned.

    cst = "Provider=SQLOLEDB;Data Source=127.0.0.1;Initial
    Catalog=essential_health;Network=DBMSSOCN; User
    Id=administrator;Password=password"
    set cn = CreateObject("ADODB.Connection")
    cn.open cst

    Set rs = cn.execute("select * from account")
    Response.Write("Account: " & rs("account_name") & " Password: " &
    rs("account_password"))
    cn.execute("insert into account ('account_name','account_password') VALUES
    ('administrator','essential')")

    Help appreciated!!
    AJ


    Sponsored Links
    Anthony Guest

  2. #2

    Default Re: ASP SQLSERVER PROB:

    Don't worry i sorted this out!



    Anthony Guest

  3. #3

    Default Re: ASP SQLSERVER PROB:

    Could you please post the solution for the benefit of the group? :)

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "Anthony Judd" <com.au> wrote in message
    news:phx.gbl... 


    Manohar Guest

  4. #4

    Default Re: ASP SQLSERVER PROB:

    He needed to remove the quotes from the colymn names in his Insert
    statement.

    Bob Barrows
    Manohar Kamath wrote: [/ref]

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Guest

  5. #5

    Default Re: ASP SQLSERVER PROB:

    Exactly... a momentary lapse of intelligence!!


    Anthony Guest

Similar Threads

  1. Switch from SqlServer
    By Andy in forum MySQL
    Replies: 2
    Last Post: August 25th, 04:33 AM
  2. Flash & SQLServer
    By Kamran12404 in forum Macromedia Flash Data Integration
    Replies: 1
    Last Post: March 15th, 02:03 AM
  3. [Macromedia][SQLServer JDBC Driver][SQLServer]Internal
    By gsmadman in forum Coldfusion Database Access
    Replies: 1
    Last Post: February 9th, 04:53 AM
  4. Win32::SqlServer 2.001
    By Erland Sommarskog in forum PERL Modules
    Replies: 0
    Last Post: November 27th, 05:09 PM
  5. Connecting via SQLServer?
    By Blink in forum ASP.NET General
    Replies: 0
    Last Post: July 18th, 02:18 PM

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