Welcome! Log In Create A New Profile

Advanced

External database

Posted by Javier.pcs.crosspost 
Javier.pcs.crosspost
External database
March 03, 2009 02:12PM
Good morning.
How can I use external databases that are not defined in the analysis, based on ODBC data sources defined in the system and be able to use all WLanguage functions for handling files (Hread, HExecuteSQLQry, Hreadseek , etc)?

Could create ODBC data sources for programming?

Message forwarded from pcsoft.us.windev
Alexandre Leclerc
Re: External database
March 03, 2009 02:44PM
Hi Javier,

It is not possible to use H* instructions in WinDev with ODBC access. Your only solution is to SQLConnecte() to an ODBC driver and use SQL* functions.

But, if performance is not important you can warp an ODBC access around a OLEDB layer. (This is an available option when creating a connexion to another database with WinDev "connexion wizard".) But it is slow. I mean, very slow. At that point you can use H* functions. If you whant that you can do it on-the-fly using the "MSDASQL" provider. You need Microsoft MDAC installed. (Look also at HListProvider().)

Now, I'm not sure to understand clearly you question but let's continue.

If the database is not defined in the analysis and you want to use on-the-fly the H* functions, you will have to describe the files on-the-fly with HDescribe* & al. functions, then make the connexion with HDescribeConnection() and continue all the process - use hODBC as OLE provider.

As to create an OLEDB/ODBC connection in the OS I don't know WinDev functions to do that, but you can do it manually (Microsoft example in VB for MSSQL: [support.microsoft.com]).

Ok, let say that all that is a lot of work. Maybe your problem can be addressed differently. And also maybe I really did not understood what you really try to achieve. But I hope that something was of help.

Best regards.
Alexandre Leclerc.pcs.crosspost
Re: External database
March 03, 2009 05:28PM
Hi Javier,

(It looks like my post on [forum.mysnip.de] has not made it's way to PCSfot's forum, so I reply here too.)

It is not possible to use H* instructions in WinDev with ODBC access. Your only solution is to SQLConnecte() to an ODBC driver and use SQL* functions.

But, if performance is not important you can warp an ODBC access around a OLEDB layer. (This is an available option when creating a connexion to another database with WinDev "connexion wizard".) But it is slow. I mean, very slow. At that point you can use H* functions. If you whant that you can do it on-the-fly using the "MSDASQL" provider. You need Microsoft MDAC installed. (Look also at HListProvider().)

Now, I'm not sure to understand clearly you question but let's continue.

If the database is not defined in the analysis and you want to use on-the-fly the H* functions, you will have to describe the files on-the-fly with HDescribe* & al. functions, then make the connexion with HDescribeConnection() and continue all the process - use hODBC as OLE provider.

As to create an OLEDB/ODBC connection in the OS I don't know WinDev functions to do that, but you can do it manually (Microsoft example in VB for MSSQL: [support.microsoft.com]).

Ok, let say that all that is a lot of work. Maybe your problem can be addressed differently. And also maybe I really did not understood what you really try to achieve. But I hope that something was of help.

Best regards.

Message forwarded from pcsoft.us.windev
Javier.pcs.crosspost
Re: External database
March 04, 2009 09:17AM
Alexandre Thanks for your reply.
It was just what I needed, I was not sure with some concepts but you've helped me.
Thank you very much

Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: