Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    58

    Unanswered: sql error "oject required"

    Hi everybody,

    I' m working with visual basic 6 and I would like to connect to my sql server database but I get the following error :
    "Run-time error 424"bject required.

    here is my code:

    sqlserverlocation = "192.168.0.102"
    sqldbname = "NUTS_MEETDB2"

    application.lock
    sConnection = "DRIVER={SQL SERVER};Server=" & sqlserverlocation & ";Database=" & sqldbname & ";UID=AiSE_RW;PWD=3333"
    Set myConn = Server.CreateObject("ADODB.Connection")
    myConn.Open sConnection

    SQLST = "Select [close] from Quotes order by date asc"

    Set myKeyRst = Server.CreateObject("ADODB.RecordSet")
    Set myConRst = myConn.Execute(SQLST, , 1)
    myKeyRst.Open SQLST, myConn, 1

    the erroe is located at the line :
    Set myConn = Server.CreateObject("ADODB.Connection")3

    thank you

  2. #2
    Join Date
    Mar 2004
    Location
    India
    Posts
    56
    hi ,

    create a dsn (with sql server driver )in your client system and connect .

    connect sql through the dsn . Once you created dsn, you can connect to vb through the data form wizard( Add in feature in vb) .

    try

    best

    graceson

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    To resolve this :
    Supply an object qualifier.
    Check the spelling of the object qualifier.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  4. #4
    Join Date
    Mar 2004
    Posts
    58

    solved

    it' s solved , thanx to everybody

Posting Permissions

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