MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file?
Posted by: Karthikeya Sharma Pancharatnam
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
Re: How to give path to database file (Mysql) from Visual Basic c++ code instead of giving it to the text file?
134
January 28, 2017 08:45AM


Sorry, you can't reply to this topic. It has been closed.

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.