+ Reply to Thread
Results 1 to 4 of 4

run time error 3709 application defined or object defined error

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    35

    run time error 3709 application defined or object defined error

    Set cmd = New ADODB.Command

    cmd.CommandType = adCmdStoredProc
    Set cmd.ActiveConnection = Module1.conn
    cmd.CommandText = "spEmergencyItemHelp"

    Set prm = cmd.CreateParameter("@ID", adInteger, adParamInput, 255, 12)
    cmd.Parameters.Append prm

    Set prm = cmd.CreateParameter("@Type", adChar, adParamInput, 255, "A")
    cmd.Parameters.Append prm

    Set rst = cmd.Execute()
    Do Until rst.EOF


    Set Sheet1.VSFlexGrid1.DataSource = rst
    rst.MoveNext
    Loop

    i am trying to execute a stored procedure from sql2005 from excel vba get the records in recordset & assign it to grid
    but i get error
    run time error 3709 application defined or object defined error

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    10 ... 21 - 32 & 64
    Posts
    2,840

    Re: run time error 3709 application defined or object defined error

    Also: www.ozgrid.com/forum/showthread.php?t=184423 plus 1 other.

    (That thread closed)

  3. #3
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: run time error 3709 application defined or object defined error

    Why do you try to assign the recordset in a loop? It must only be done one time.

  4. #4
    Registered User
    Join Date
    11-27-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: run time error 3709 application defined or object defined error

    thanks for the replies
    but i have ended this funcationality due to some issues

    thanks once again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  2. [SOLVED] Macro causes Run time error 1004 Application defined or object-defined error
    By Firefighter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2012, 04:09 AM
  3. [SOLVED] run-time error '1004' application-defined or object-defined error - Excel 2007
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 02:46 AM
  4. Macro - Run-time Error '1004': Application defined or object defined error
    By robby10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-14-2010, 07:55 AM
  5. [SOLVED] Run Time Error 1004 - Application-defined or object-defined error
    By brent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2005, 01:05 PM

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1