Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 3 Monaten
Letzter Beitrag:
vor 5 Jahren, 3 Monaten
Beteiligte Autoren:
Kanwal, GuenterP, Milind Lokare, Arie

Stored procedure error on hopen

Startbeitrag von Milind Lokare am 22.03.2013 08:18

How do I update or read data in stored procedure ?



Milind Lokare

[attachment 280 weberror1.png]
[attachment 281 weberror2.png]


Hi, it says what it is:
in line 29 you try to access the file TestHFCS which is neither defined in the project's analysis nor separately defined and opened.
Regards, Guenter

von GuenterP - am 22.03.2013 09:06
Thank you for replying Guenter!

In the above problem, I'm using a C/S DB. HFCSTest is the name of my project in which i have a set of stored procedure named "Set_HFCSTest_Mail" containing a Procedure "Mail".

On line 29th of "Mail" procedure i've used HOpen() and that is where HFControl Centre giving me an error.

Any solutions??

von Kanwal - am 22.03.2013 09:41
Hi, please, read my post again! Thank you! Guenter

von GuenterP - am 23.03.2013 15:16
The stored procedure is normally running in the context of your clientapplication (your exe) and get's all necesarry information about files+fields from it.

You say you use the hf control centre, I presume that test-button?. While hfcc shows you all the files and fields and so on, it does not pass it to the stored procedure. So the stored procedure does not know anything about the file you are trying to read, thus throwing an error.

Same thing counts for the hfcs engine, when using scheduled tasks. Again the file definitions are unknown to the stored proc. It looks like pcsoft has not implemented this. Very strange, because one cannot use stored procedures in "scheduled task" now. At least not very easy (10x faster...) In this case you have to use HDescribe() to define all files, inside the stored procedure. Then it will run without error from HF control centre.

von Arie - am 23.03.2013 15:41

What we actually want to do is to send emails from the database, every 5 min.
However when we try to open a database via HOPEN(), we get the above error.

There will be no exe from which the stored proc is called. It must run on its own.

We therefore tried to create a query which gets executed, however HSEEKFIRST also give the same error.

von Milind Lokare - am 25.03.2013 07:16
How does one connect the stored procedures with the database present in HF Control center?
How does one open the database present in HF Control Center by programming i.e. via stored procedure?
* I've created the database in HF Control Center and also imported the files in it. Still i'm not able to excess these files via HOpen()

Any solutions?

von Kanwal - am 28.03.2013 10:29
Hi Arie,

Yes the error is on the test button.

You said one cannot use stored procedure in "scheduled task". If I dont try and open any database in my stored procedure and test it, no error pops up. Only when i try to access the database in my stored procedure is when i get the error.


von Kanwal - am 28.03.2013 10:48
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.