PDA

Click to See Complete Forum and Search --> : Problem...


Zvonko
Jul 3rd, 2000, 07:27 AM
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

Ianpbaker
Jul 3rd, 2000, 08:39 AM
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

Zvonko
Jul 3rd, 2000, 10:51 AM
Oh, yes, I forgot to tell.
VB highligtes line where I execute command (.Command1).
Do you know the answer?

Clunietp
Jul 3rd, 2000, 10:55 AM
you are not telling the command to EXECUTE

.Command1.Execute

Zvonko
Jul 3rd, 2000, 11:32 AM
Thanks!

I'll try that right now!!!

Zvonko
Jul 3rd, 2000, 01:05 PM
It doesn't work. Nothing works.
Damn!
Does anyone have working sample with DataEnvironment?

Zvonko

Clunietp
Jul 3rd, 2000, 08:01 PM
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

Clunietp
Jul 4th, 2000, 11:50 AM
when it says ERRORS OCCURED, you should loop thru the errors collection as I described...did you do that?

Zvonko
Jul 5th, 2000, 04:52 AM
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.

Clunietp
Jul 5th, 2000, 11:46 PM
ok, I'm at Clunietp@yahoo.com