|
ofter XML generate how will send XML file in Tally 9.0
|
|
|
|
|
May I suggest that you should really ask this question here[^].
|
|
|
|
|
I would like to know haw to check if a record exists before the record is deleted
|
|
|
|
|
I am not sure why you need that. If you just want to display number of deleted records in screen you may use ExecuteNonQuery method. It returns number of rows that were affected by the command.
"Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[ ^]
|
|
|
|
|
What sort of record? Where does it exist: database, flat file, jukebox? Try providing some proper detail to your question.
|
|
|
|
|
Don't. If you have a recordId, assume it exists and delete it - catch the exception if it did not. Adding checks like the one you proposed might say it exist, and still be deleted (by someone else) an instance later (unless it's an atomic operation, which I doubt).
|
|
|
|
|
if you delete it while it doesn't exist SQL will return something like: "0 rows deleted".
Delete from tableX where myconstraint='Myconstraint';
If you do it in code you can get that by reading out the NrOfRowsAffected property when doing an ExecuteNonQuery statement. Same goes for Insert and Update queries eg.
as someone already replied, checking if it exists is inaccurate at best and doesn't add any functional advantage.
if you really, really must check it. Perform a select query perhaps with a count.
Select count(id) from tableX where myconstraint='Myconstraint'
if count > 0 , the record exists.
hope this helps.
|
|
|
|
|
If it's a database, then the system will do that for you.
|
|
|
|
|
I presume we're talking about database records.
In which case, why do you care whether it exists? Delete it anyway - you're not going to get an error saying that 'this record you don't want doesn't exist'.
Strange question.
|
|
|
|
|
develop the project in microsoft.net through C# on topic window based simulator using backpropogation algorithm.
|
|
|
|
|
You need to post your full assignment so we can really mock you.
|
|
|
|
|
This is your project to do. What's the point of us writing your code for you, as you learn nothing and you will be ill suited to becoming a professional developer. The trick is to research the algorithm yourself, and break it down little bit by little bit. A trick I sometimes use to help is to talk an algorithm through with someone - once you try and explain it, you see where the gaps are in your knowledge and it becomes easier to tackle those areas.
|
|
|
|
|
Is that some sort of a question?
Or an order???
|
|
|
|
|
My design is simple,
My application constructs a message with a header class and a Datastream in the body, it queues it for a central message distribution service which inturn queues it for other applications of mine to read - all via MSMQ with security set to None.
The CMDS is perfectly able to read the message from App 0, but it repeatedly fails to requeue it for App 1 etc.
But not consistently! Sometimes after clearing / deleting the queues it will work for a couple of times and then fails again.
The logic to queue form App 0 to the CMDS which rarely fails is replicated almost exactly in the CMDS to queue to the other Applications - but it hardly ever works!
I need to revisit the code to improve transaction handling but if that resolves the matter it will be accidental!
Any thoughts / experiences that might assist?
Ger
|
|
|
|
|
Make sure your queue is not clogged with messages and that there is no size limit on the queue.
|
|
|
|
|
Queue deleted and recreated to ensure that there is no clogging. I need to recheck sizings.
Ger
|
|
|
|
|
Permissions, it must be permissions, even a single integer message won't queue from that point in the code!
Ger
|
|
|
|
|
Ger Hayden wrote: The CMDS is perfectly able to read the message from App 0, but it repeatedly
fails to requeue it for App 1 etc.
Different boxes?
Then note that MSMQ has a convoluted routing strategy which is not visible to the sender. So messages can take hours to arrive at their destination. Presuming the keep alive time is that long.
|
|
|
|
|
Not yet - I have to implement some way past the firewall - I'm thinking Lowy's http bridge.
Ger
|
|
|
|
|
Hi All,
I am trying to write a desktop app where users can browse their computers for images and when they are found drag them onto a design stage. Basically the interface for the app consists of a tools panel on the right side of the screen and the design stage (a large white box) on the left. One of the many tools within the tools panel is a browse button which is used to search for images. How can I add the ability to drag images from where ever they reside onto the design stage using C#? Please point me to a site that talks about importing images into an app if you know of any, thanks in advance for your help.
|
|
|
|
|
ASPnoob wrote: How can I add the ability to drag images from where ever they reside onto the design stage using C#?
Create a new Panel in the staging-area, and display the image within. Go here[^] for explanation on implementing Drag&Drop.
Images can't be stored in the application, one would use a special directory or, preferably, a local database (like SqlCe or Sqlite). There are various examples on storing and retrieving images from a database.
|
|
|
|
|
I'm working on writing something that will allow you to create distribution groups in Exchange 2010.
The problem I am having is I am passing string arrays to my service for the Members and ManagedBy parameters.
This is how I attempted to make this work:
var members = new MultiValuedProperty<object>();
foreach (string s in group.Members)
members.Add(s);
cmd.AddParameter("Members", members);
The problem I'm having is it is returning an error because it appears it wants Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter within the MultiValuedProperty.
I'm a little confused because it then looks like the RecipientWithAdUserGroupIdParameter contains an array of RecipientIdParameter:
Error: System.ServiceModel.FaultException: System.Management.Automation.RemoteException: Cannot process argument transformation on parameter 'Members'. Cannot convert value "8caf8910-86d0-4d00-a452-8c30c0f62373 cfa01a55-6b35-4e61-bf0e-9050308623c7" to type "Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter`1[Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter]]". Error: "Cannot convert the "8caf8910-86d0-4d00-a452-8c30c0f62373" value of type "Deserialized.Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter`1[Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter]"." at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke() at CloudPanel.Exchange.ExchPs.RunPowershell(PSCommand pscmd, String script) at CloudPanel.Exchange.ExchPs.RunPowershell(PSCommand pscmd, String script) at CloudPanel.Exchange.ExchPs.New_DistributionGroup(DistributionGroup group, String companydn)
Anyone have an idea what I can do to accomplish this? There are some stuff out on the web about using ICollection when reading from Exchange but i'm trying to send commands to exchange.
|
|
|
|
|
RecipientIdParameter is the baseclass for RecipientWithAdUserGroupIdParameter so I think by passing the RecipientWithAdUserGroupIdParameter with the MultiValuedProperty might solve this error.
Note:I havent used this before.
Jibesh V P
|
|
|
|
|
The problem is RecipientWithAdUserGroupIdParameter is another array.
so it has to be done like this:
var members = new MultiValuedProperty<RecipientWithAdUserGroupIdParameter<RecipientIdParameter>>();
But then I can't add to the RecipientWithAdUserGroupIdParameter because it doesn't have that method.
new RecipientWithAdUserGroupIdParameter<RecipientIdParameter>().
Only has these methods:
Equals
GetHashCode
GetObjects<>
GetType
ToString
|
|
|
|
|
I need to do a simple drag and drop procedure, but I dont know why this code isn´t working...
MainWindow.XAML:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication13
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void img_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Image img = (Image)sender;
DataObject dataObj = new DataObject(img);
DragDrop.DoDragDrop(img, dataObj, DragDropEffects.Move);
}
private void target_Drop(object sender, DragEventArgs e)
{
Image img = (Image)e.Data.GetData(typeof(Image));
Utes.Children.Remove(img);
Nivel1.Children.Add(img);
}
private void img_MouseMove(object sender, MouseEventArgs e)
{
}
private void img_DragLeave(object sender, DragEventArgs e)
{
e.Effects = DragDropEffects.Move;
}
Please... any advice will be appreciated!.
|
|
|
|