Results 1 to 10 of 10

Thread: Problem...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    Exclamation

    Hello!

    I have problem with DataEnvironment.
    I use it in code (not in form objects) and I write it like that (suggestion from one of Forum's member):

    With DataEnvironment1
    .Command1 'Executes command Command1
    .rsCommand1.MoveFirst
    For I=1 to .rsCommand1.Recordcount
    List1.AddItem .rsCommand1.Fields(1).Value
    Next
    End With

    And then I allways get an error. It just says "Error occured". Can you help me with that. It's kind an annoying thing, because I can't use DataEnvironment.

    Regards
    Zvonko
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi Zvonko

    One of you problems is that you haven't got a rsCommand1.Movenext within your for statement.

    When the error comes up what line does VB highlight.


    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Oh, yes, I forgot to tell.
    VB highligtes line where I execute command (.Command1).
    Do you know the answer?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    you are not telling the command to EXECUTE

    .Command1.Execute

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Thanks!

    I'll try that right now!!!
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    It doesn't work. Nothing works.
    Damn!
    Does anyone have working sample with DataEnvironment?

    Zvonko
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  7. #7
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    doesn't work?

    loop thru the errors collection to get a detailed description of the error

    dim objErr as adodb.error

    for each objErr in objConnection.Errors
    msgbox objErr.description
    next objerror

  8. #8
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    when it says ERRORS OCCURED, you should loop thru the errors collection as I described...did you do that?

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    I looped through errors collection and it just said "Errors occured", nothing else.
    I can send you my DataEnvironment and you can try, because I ran out of ideas.
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  10. #10
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    ok, I'm at [email protected]

Posting Permissions

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



Click Here to Expand Forum to Full Width