>Sir, I have these codes
>
>
>cmd="select MAX(vou_no)as max_sno from arrival"
>if sqlexec(con,cmd,'table1')<0
> aerror(laerror)
> messagebox(laerror[1,2])
> return.f.
>else
> select table1
> thisform.text1.value=nvl(max_sno,0)+1
>endif
>
>
>These code work fine on every event but not on INIT of Form.
>
>When I use above code on INIT of form then I have to face this error message
>
>
Connection #1 is busy.The Init() of controls within the form may be running before the Form.Init(). If any of those run SQLEXEC() commands or use remote views, they may still be executing when the Form.Init() tries to run its code, giving you the error.
One thing to bear in mind is with remote views - they have a default FetchSize of 100, so if a view will return more than 100 rows then it will pause. If you try to do anything else on that same connection you get the error you're seeing. In that particular case the solution is to use DBSETPROP() to set the view's FetchSize property to -1 (fetch all rows).
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up