public void InsertRow(string bigcommerceConnectionString)
{
// If the connection string is empty, use default.
if(bigcommerceConnectionString == "")
{
bigcommerceConnectionString =
"Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;";
}
BigcommerceConnection myConn = new BigcommerceConnection(bigcommerceConnectionString);
string myInsertQuery = "INSERT INTO customers (firstname, lastname, email) VALUES ('John','Smith','[email protected]')";
BigcommerceCommand bigcommerceCommand = new BigcommerceCommand(myInsertQuery);
bigcommerceCommand.Connection = myConn;
myConn.Open();
try
{
bigcommerceCommand.ExecuteNonQuery();
}
finally
{
myConn.Close();
}
}