Click here to Login





                                                   Exporting Databases

  0

0
Graeme Smith
2012-02-07 09:20:52


Hi.

I know that the Databases.GetDatabasesData(symbol, databaseName, fieldName) function can be used to get the data belonging to a database,
but in order to use this, I was wondering if there is any way to programatically get a list of the field names belonging to a database.
Also to get a list of Databases for an Account, although I guess that could just be done by looking in the directory of the Account.

Essentially what I would like to do is

Foreach Database in Account.Databases
Foreach Field in Database.Fields
...

Or can this only be done by hard coding a list of each database and field?

Thanks,

Graeme



QuantShare
2012-02-07 09:56:54

  0

Best Answer
Currently, it is not possible to get databases and fields programmatically. We will add two functions in the next release.

Yes, you can hard code these lists.

Hashtable hash = new Hashtable();
ArrayList fields1 = new ArrayList();
fields1.Add("Field 1");
fields1.Add("Field 2");
hash.Add("Database 1", fields1);

foreach(string database in hash.Keys)
{
ArrayList fields = (ArrayList)hash[database];
foreach(string field in fields)
{
MessageBox.Show(database + " - " + field);
}
}




No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Advanced Quotes and Custom Databases Function
Lagged Data From a Custom Database
Equity Export To Excel
Vilnius, Tallinn and Riga stock exchanges
U.S. Stock Market

How-to Lessons
How to backup your databases (EOD, Intraday, Tick and Custom) and...
How to create a mobile database/account
How to export trading data to a CSV file
How to quickly select stocks based on the last value of a databas...
How to plot news on a chart?

Related Forum Threads
Exporting various data
Multiple quote databases with same symbols?
Exporting optimization results
Exporting All symbols of a watchlist in seperate CSV (name -wise)...
Exporting optimized test data from trading report

Blog Posts
Reading and Exporting Data from QuantShare to Excel Programmatica...
How to create custom databases in your trading software
How to download the history of dividend payments for stocks in th...
Charting, Backtesting and Trading using Fundamental Data
4 Links to Download Free Historical Stock Prices Data by Date









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.