{{Quickfixn}} help with example storing message in database thru odbc
Alberto Honorato
honorabetto at gmail.com
Sat Oct 18 06:50:11 PDT 2014
Hello,
I am implementing a quickfix connection with .NET. Right now the messages
are being saved in a text file, however for my project I need to store them
into an sql server database thru ODBC.
I have been searching the web to achieve this, but I wasn't able to find
any example.
Could you help me with an example, similar to the code below, that stores
the FIX messages into MS SQL Server?
Thanking in advance
Alberto Honorato
*main**method*
*QuickFix.SessionSettings**settings**= new**QuickFix.SessionSettings*
*(file);*
*TradeClientApp**application**= new**TradeClientApp**();*
*QuickFix.IMessageStoreFactory**storeFactory**= new*
*QuickFix.FileStoreFactory**(**settings**);*
*QuickFix.ILogFactory**logFactory**= new**QuickFix.FileLogFactory**(*
*settings**);*
*QuickFix.Transport.SocketInitiator**initiator**= new*
*QuickFix.Transport.SocketInitiator**(**application**,**storeFactory**,*
*settings**,**logFactory**);*
*Configuration**file*
*#**default**settings**for**sessions*
*[**DEFAULT**]*
*FileStorePath**=**store*
*FileLogPath**=**log*
*ConnectionType**=**initiator*
*ReconnectInterval**=60*
*SenderCompID**=******
*#**session**definition*
*[**SESSION**]*
*#**inherit**FileStorePath**,**FileLogPath**,**ConnectionType**,*
*ReconnectInterval**and**SenderCompID**from**default*
*BeginString**=**FIX**.4.4*
*TargetCompID**=*****
*SenderCompID**=******
*StartTime**=01:00:00*
*EndTime**=23:30:00*
*HeartBtInt**=60*
*SocketConnectPort**=********
*SocketConnectHost**=*********
*DataDictionary**=../../**dictionary**/FIX44.**xml*
*FileLogPath**=../../**Log**/**LogFix.txt*
*FileStorePath**=../../**store*
================================================================================================
*main**method*
QuickFix.SessionSettings settings = new QuickFix.SessionSettings(file);
TradeClientApp application = new TradeClientApp();
QuickFix.IMessageStoreFactory storeFactory = new
QuickFix.FileStoreFactory(settings);
QuickFix.ILogFactory logFactory = new QuickFix.FileLogFactory(settings);
QuickFix.Transport.SocketInitiator initiator = new
QuickFix.Transport.SocketInitiator(application, storeFactory, settings,
logFactory);
*Configuration**file*
# default settings for sessions
[DEFAULT]
FileStorePath=store
FileLogPath=log
ConnectionType=initiator
ReconnectInterval=60
SenderCompID=*****
# session definition
[SESSION]
# inherit FileStorePath, FileLogPath, ConnectionType, ReconnectInterval and
SenderCompID from default
BeginString=FIX.4.4
TargetCompID=****
SenderCompID=*****
StartTime=01:00:00
EndTime=23:30:00
HeartBtInt=60
SocketConnectPort=*******
SocketConnectHost=********
DataDictionary=../../dictionary/FIX44.xml
FileLogPath=../../Log/LogFix.txt
FileStorePath=../../store
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20141018/b1ad96a6/attachment.htm>
More information about the Quickfixn
mailing list