public void InsertRow(string quickBooksConnectionString)
{
// If the connection string is empty, use default.
if(quickBooksConnectionString == "")
{
quickBooksConnectionString =
"Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt";
}
QuickBooksConnection myConn = new QuickBooksConnection(quickBooksConnectionString);
string myInsertQuery = "INSERT INTO Customer (DisplayName, Notes) VALUES ('John Smith', 'VIP Customer')";
QuickBooksCommand quickBooksCommand = new QuickBooksCommand(myInsertQuery);
quickBooksCommand.Connection = myConn;
myConn.Open();
try
{
quickBooksCommand.ExecuteNonQuery();
}
finally
{
myConn.Close();
}
}