0

I am working on creating a network in Omnet++ consisting of network hosts.What I want to know is it possible for one to read in data from SQL server and use for message passing between different host nodes.

In short, is it possible to connect a Omnet++ project to SQL server?

nadra
  • 1
  • 3

1 Answers1

0

Yes, it is possible to use an SQL server in OMNeT++. The behavior of node in OMNeT++ is defined using C++, so one can write a C++ code which connects to the SQL server, reads something from database, and then sends a message to another host.

Jerzy D.
  • 6,707
  • 2
  • 16
  • 22
  • Can you please tell me the connection string or piece of code through which i can connect to my database using C language. Like for example in case of mysql this connection string is something like "mysql_real_connect(conn,host,login,pwd,db,0,NULL,0)" – nadra Jan 15 '19 at 11:40
  • Look at these questions: [C++ Access to SQL Server from Linux](https://stackoverflow.com/questions/2545858/c-access-to-sql-server-from-linux), [How to access SQL server from linux c++ application?](https://stackoverflow.com/questions/42168924/how-to-access-sql-server-from-linux-c-application). They contain links to tutorials that may help you. – Jerzy D. Jan 15 '19 at 20:12