#1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Mar 2006
    Posts
    390
    Rep Power
    12

    [ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.Events'. on INSERT


    Code:
    dim eventInsertQuery
    
    eventInsertQuery = "INSERT INTO dbo.Events ('id','event_type','staff_id','department','subdepartment','event_date','timestamp','time_spent','comm_serv_id','advocacy_issue','notes')VALUES ('','" & request.Form("event_type") & "','" & request.Form("staff_id") & "','" & request.Form("dept") & "','" & request.Form("subdept") & "','" & request.Form("event_date") & "','" & NOW & "','" & request.Form("time_spent") & "','" & request.Form("comm_serv_id") & "','" & request.form("advocacy_issue") & "','" & request.form("event_notes") & "')"
    
     
    'Response.Write(eventInsertQuery) 'testing echo
    
    dim insertCmd
    Set insertCmd = Server.CreateObject("ADODB.Command")
    insertCmd.ActiveConnection = MM_editConnection
    insertCmd.CommandText = eventInsertQuery
    insertCmd.Execute  '''Offending line 454
    insertCmd.ActiveConnection.Close
    Err0r:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.Events'.

    /private/community_Services/addCommunitySvcContact.asp, line 454

    --

    According to Enterprise Manager owner is dbo.
  2. #2
  3. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Mar 2006
    Posts
    390
    Rep Power
    12
    Dunno why its being inconsistent, but I solved the problem by putting dbname.dbo.table
  4. #3
  5. Senior Sarcasm Wizardess
    ASP Mastermind (5000+ posts)

    Join Date
    Feb 2005
    Location
    Dreamland
    Posts
    13,608
    Rep Power
    2462
    is your connection set up to use that database that contains that table?
    Quote of the Month:
    Planning: Much work remains to be done before we can announce our total failure to make any progress.

    Questions to Ponder:
    If convenience stores are open 24 hours a day, 365 days a year, why are there locks on the doors?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright© 2008 sbenj69

Similar Threads

  1. Sql to Asp Problem.
    By jheinzman in forum Programming Help
    Replies: 3
    Last Post: March 15th, 2005, 10:32 AM
  2. Insert Into MS sql server
    By khan in forum SQL Development
    Replies: 1
    Last Post: January 6th, 2005, 02:08 PM
  3. function for dropdown with 3 checkboxes
    By gilgalbiblewhee in forum ASP Development
    Replies: 1
    Last Post: August 18th, 2004, 08:07 PM
  4. MS SQL Server 7 access is denied in EM after SP4
    By Hawkinpaul in forum Microsoft SQL Server
    Replies: 1
    Last Post: October 30th, 2003, 04:45 PM
  5. Web server’statistical analysis
    By cso in forum ASP Development
    Replies: 0
    Last Post: April 19th, 2003, 11:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo