Discussion:
ODBC Driver Question
Chris Davis
2018-07-12 12:40:06 UTC
Permalink
Hi All

I am running a routine which continually repeats a query from an ODBC source to sync some data.

There seems to be a problem with the driver that over time the .EXE I have created takes up more and more memory until it goes bang.

If I change this to query from a different source requiring a different driver I don’t have an issue (i.e. I’m happy it’s not me 😊 )

I would like to keep the EXE running rather than scheduling it to run close run close etc. As I have a log on the screen showing a visual status of the query and when it was last completed.

I am now thinking there must be an easy way to fire off this query in a different datasession or thread so that any problems caused by the ODBC driver are lost after each execution, any brilliant ideas?

Thanks

Chris.



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@LO2P265MB0031.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those la
Dave Crozier
2018-07-12 14:59:08 UTC
Permalink
Chris,
Do exactly what you suggest and pass the data between datasessions using cursorToXML(),

It may not be brilliantly fast but it will do the job.

Dave



---------------------------------------------------------------
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.

Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.

It is the responsibility of the recipient to ensure that they have adequate virus protection.

Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH

Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------

Terms & Conditions:

Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time

-----Original Message-----
From: ProFox <profox-***@leafe.com> On Behalf Of Chris Davis
Sent: 12 July 2018 13:40
To: ***@leafe.com
Subject: ODBC Driver Question

Hi All

I am running a routine which continually repeats a query from an ODBC source to sync some data.

There seems to be a problem with the driver that over time the .EXE I have created takes up more and more memory until it goes bang.

If I change this to query from a different source requiring a different driver I don’t have an issue (i.e. I’m happy it’s not me 😊 )

I would like to keep the EXE running rather than scheduling it to run close run close etc. As I have a log on the screen showing a visual status of the query and when it was last completed.

I am now thinking there must be an easy way to fire off this query in a different datasession or thread so that any problems caused by the ODBC driver are lost after each execution, any brilliant ideas?

Thanks

Chris.



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@LO2P265MB0031.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages
Stephen Russell
2018-07-12 15:06:31 UTC
Permalink
You may be opening up a new connection each time and never closing an old
one. That is my first guess.
Post by Chris Davis
Hi All
I am running a routine which continually repeats a query from an ODBC
source to sync some data.
There seems to be a problem with the driver that over time the .EXE I
have created takes up more and more memory until it goes bang.
If I change this to query from a different source requiring a different
driver I don’t have an issue (i.e. I’m happy it’s not me 😊 )
I would like to keep the EXE running rather than scheduling it to run
close run close etc. As I have a log on the screen showing a visual status
of the query and when it was last completed.
I am now thinking there must be an easy way to fire off this query in a
different datasession or thread so that any problems caused by the ODBC
driver are lost after each execution, any brilliant ideas?
Thanks
Chris.
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for thos
Dave Crozier
2018-07-12 15:07:21 UTC
Permalink
Chris,
Unfortunately if it is a roque process within the driver that is eating up memory then you may not be able to control it. Have you tried using the ODBC Driver just to read in data and monitored the Memory settings to see how much and when this is happening.

Also as a WAG, have you tried setting the _VFP.AutoYield setting to .F. (By default it is .T.)

Dave



---------------------------------------------------------------
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.

Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.

It is the responsibility of the recipient to ensure that they have adequate virus protection.

Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH

Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------

Terms & Conditions:

Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time

-----Original Message-----
From: ProFox <profox-***@leafe.com> On Behalf Of Chris Davis
Sent: 12 July 2018 13:40
To: ***@leafe.com
Subject: ODBC Driver Question

Hi All

I am running a routine which continually repeats a query from an ODBC source to sync some data.

There seems to be a problem with the driver that over time the .EXE I have created takes up more and more memory until it goes bang.

If I change this to query from a different source requiring a different driver I don’t have an issue (i.e. I’m happy it’s not me 😊 )

I would like to keep the EXE running rather than scheduling it to run close run close etc. As I have a log on the screen showing a visual status of the query and when it was last completed.

I am now thinking there must be an easy way to fire off this query in a different datasession or thread so that any problems caused by the ODBC driver are lost after each execution, any brilliant ideas?

Thanks

Chris.



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@LO2P265MB0031.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers
Wollenhaupt, Christof
2018-07-15 07:49:21 UTC
Permalink
Post by Chris Davis
I am now thinking there must be an easy way to fire off this query in a
different datasession or thread so that any problems caused by the ODBC
driver are lost after each execution, any brilliant ideas?
Memory is allocated on the process level and not automatically freed when
the thread that allocate a block is terminated. If it is a faulty driver,
you need to create a new process from time to time. Options would be to put
this part of your application into a EXE COM Server that you occasionally
release and re-create, a separate EXE that you launch or by letting your
application restart itself every x iterations.

You haven't said anything about which ODBC driver this is. Maybe there is
an updated version available? Or maybe there is another vendor with drivers
for the same database (Oracle DBs have multiple options, for instance).
--
Christof
--
foxpert GmbHUlzburger Straße 352
22846 Norderstedt


Tel. Zentrale: (040)
605 3373-70
Fax: (040) 605 3373-75
http://www.foxpert.com
<http://www.foxpert.com>
Registergericht: Amtsgericht Kiel, HRB 19260 KI

Sitz der Gesellschaft: Norderstedt
Geschäftsführer: Christof Wollenhaupt



--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those l
Loading...