You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
this is code,install into two MT,use for communicating with two terminal.
Thank you very much appleparty!
you are welcome,the code is not work in v600+, so if you can tell us how to solve the problem,i want thank you very much!
@gorick:
Great work to connect to an ORACLE DB! But how do you read/write from/to ORACLE with mql4?
And where did you get oraDLL.dll from?
THX in advance!
Michael
I've got the same questions as m.mick:
Where can I download oraDLL.dll and how is the implemenation of reading and writing with ORACLE-DB?
THX 4 helping me!
@gorick:
Great work to connect to an ORACLE DB! But how do you read/write from/to ORACLE with mql4?
And where did you get oraDLL.dll from?
THX in advance!
Michael
m.mick,
What I have given is a code snippet using Oracle Pro*C precompiler. Same as the EXEC SQL CONNECT. Look at the sample below. You write the code then run this through the Oracle Pro*C precompiler which produces C code that you then compile as part of your DLL in function calls. You need to know Oracle, get the Oracle DB and Client software, including the precompilers to do this. I have been using oracle for a very long time and prefer it to all others, simply because I am used to it.
Good luck.
The Oracle Pro*C precompiler generates C code from the above to interface Oracle using the OCI - Oracle Call Interface, its native API.
m.mick,
What I have given is a code snippet using Oracle Pro*C precompiler. Same as the EXEC SQL CONNECT. Look at the sample below. You write the code then run this through the Oracle Pro*C precompiler which produces C code that you then compile as part of your DLL in function calls. You need to know Oracle, get the Oracle DB and Client software, including the precompilers to do this. I have been using oracle for a very long time and prefer it to all others, simply because I am used to it.
Good luck.
The Oracle Pro*C precompiler generates C code from the above to interface Oracle using the OCI - Oracle Call Interface, its native API.
I forgot to mention that you will need the 32bit version of the Oracle Instant Client, found here: http://www.oracle.com/technetwork/topics/winsoft-085727.html, the 64 bit will not work with the MetaTrader platform. The DB can be the 64 bit version. You have to know Oracle, it is a complex piece of software. You can develop for free, you just need to create a registration with Oracle, it is free to register. All Oracle downloads are free.
gorick:
Yeah, you are right, ORACLE is a complex software. I worked with ORACLE since a couple of years (but only SQL and PL/SQL), it's the best database. Unfortunately I havn't developed with Pro*C Compiler or DLL's. So it's quite difficult for me, to do this. But I gonna try! :-)
I've got a couple of questions regarding to your great work.
If I ry to compile (Build 610) it, I'll receive error messages like "arrays are passed by reference only". Why? And what should I do? Why did you use uchar[] and not string? Maybe because of the Pro*C-Compiler?
How did you develop the DLL? With MT4 as well? I receive a *.ex4-File after compiling in meta editor.... .
If I receive the .c file from the Pro*C precompiler, what do I have to do with that file? How do I develop or generate a DLL with that piece of code?
Oracle Instant Client is mandatory for every client on which the oraDLL should be used. Right?
THX in advance!!!
If I use the ORACLE Pro*C Compiler, I'll get a lot of errors after inserting the generated code into the dll.
Here are some problems after compiling the dll:
- the declaration of UNAME_LEN, PWD_LEN and DBSTRING_LEN is missing
- is EXPORT the right word, I'll get an error; isn't extern the right word?
- connect1 (and 2 and 3) are of different types: in the declaration char ** and the usage (strncpy) only char *; and it's depricated, you should use strncpy_s
- sqlca is not declarated
- ...
Can anybody please help me?
THX in advance,
Michael