MySQL Forums :: MySQL for Visual Studio :: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file?


Advanced Search

Re: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file?
Date: January 28, 2017 08:45AM

Sample code-

Write the updated order data (after the production data is entered) into the order text file
*/
void writeUpdateOrderdata(ORDER_MAP mapOrder)
{
ofstream ostream;
ostream.open("orderdetails.txt");
ostream<<"ordernumber,ordermaterial,orderqty,completedqty,openqty,deliveredqty,ordertime,deliverytime"<<endl;
ORDER_MAP::iterator IterOp2 =mapOrder.begin();
while(IterOp2!=mapOrder.end())
{
ostream<<IterOp2->second.getordernumber()<<","<<IterOp2->second.getordermaterial()<<","<<IterOp2->second.getorderquantity()<<","<<IterOp2->second.getcompletedquantity()<<","<<IterOp2->second.getopenquantity()<<","<<IterOp2->second.getdeliveredquantity()<<","<<IterOp2->second.getordertime()<<","<<IterOp2->second.getdeliverytime()<<endl;
IterOp2++;
}
ostream.close();
}


Here in the code, I want to change ordermaterials.txt to database file. Please guide me.

Options: ReplyQuote


Subject Views Written By Posted
How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file? 69 Karthikeya Sharma Pancharatnam 01/28/2017 08:39AM
Re: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file? 48 Karthikeya Sharma Pancharatnam 01/28/2017 08:45AM
Re: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file? 29 JOSE RAMIREZ 02/01/2017 12:11AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.