From: <alt...@gm...> - 2015-03-04 01:06:36
|
Hi, The sample noted is writed in C# and work fine. I’m try in VS 2013 Desktop Express. To make it clear, I join it here... static void Main(string[] args) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.DataSource = "localhost"; cs.Database = "employee.fdb"; cs.UserID = "SYSDBA"; cs.Password = "masterkey"; cs.Charset = "NONE"; cs.Pooling = false; FbConnection connection = new FbConnection(cs.ToString()); connection.Open(); FbRemoteEvent revent = new FbRemoteEvent(connection); revent.AddEvents(new string[] { "new_order" }); // Add callback to the Firebird events revent.RemoteEventCounts += new FbRemoteEventEventHandler(EventCounts); // Queue events revent.QueueEvents(); string sql = "INSERT INTO SALES (PO_NUMBER, CUST_NO, SALES_REP, ORDER_STATUS, " + "ORDER_DATE, SHIP_DATE, DATE_NEEDED, PAID, QTY_ORDERED, TOTAL_VALUE, " + "DISCOUNT, ITEM_TYPE) VALUES (@po_number, 1004, 11, 'new', " + "'1991-03-04 00:00:00', '1991-03-05 00:00:00', NULL, 'y', 10, 5000, " + "0.100000001490116, 'hardware');"; FbCommand command = new FbCommand(sql, connection); command.Parameters.Add("@po_number", FbDbType.Char, 8); for (int i = 360; i < 365; i++) { command.Parameters[0].Value = "V91E0" + i.ToString(); command.ExecuteNonQuery(); } System.Threading.Thread.Sleep(2000); connection.Close(); } static void EventCounts(object sender, FbRemoteEventEventArgs args) { Console.WriteLine("Event {0} has {1} counts.", args.Name, args.Counts); } My need: A sample writer in Visual Basic .Net (VB.NET). Sameone can put a answer for me? Tanks a lot. Paulo Cezar Altafin .·. Cambé - Pr - Brasil |