Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009

    Unanswered: Executing Update in Temporary Table

    Hello ....

    I'm having a problem with VB6 + SQL 2005. =D

    My problem is when I try to execute this cmd:

    "ADOConnect.Execute "Update #QTD_Sinistros set ... "

    and ADOConnect its use to open the database:

    ADOConnect.Open "Provider=SQLNCLI;Server=;Database=;UID=;PWD=; "


    Microsoft Visual Basic
    Run-time error '-2147217865 (80040e37)':

    Invalid object name '#QTD_Sinistros'.
    OK Help

    Could be problem with permission ?? But I have permission to create this #QTD_Sinistros

    If I change the connection to:

    ADOConnectGS.ConnectionString = "driver=Sql server;UID=;PWD=;Server=" & "; database="
    ADOConnectGS.ConnectionTimeout = 180

    It works! Why ? How Can I change the first code?

    Last edited by Marco Aurelio Jr; 02-17-09 at 14:43.

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Could be a problem with #. Maybe it has a special meaning when using a connection Object for SQLNCLI.
    Did you try to create a Command object and use it to execute the query?

    Have a nice day!

Posting Permissions

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