|
i want to load the foll ruleml into dataset but it dosen't allow it
plz suggest some solution .
the ruleml is as follows
- <root>
- <config>
- <engine-cfg>
- <logging>
<directory>/root/
<size>500000
<level>Debug 1
- <monitor>
<port>4455
<debug-mode>on
- <event-inputs>
- <event-input name="None" type="xmlrpc">
<port>4600
- <rules>
- <rule name="rule1" delivery="all" limit="None" create="single" parameter="append">
<description>
<event-ref enabled="yes">sit1
<condition-ref enabled="no">
<action-ref enabled="no">
<instance-limit>
- <rule name="rule2" delivery="all" limit="None" create="single" parameter="append">
<description>
<event-ref enabled="yes">sit1
<condition-ref enabled="no">
<action-ref enabled="yes">action1
<instance-limit>
- <event-defs>
- <event-def name="e1" type="basic">
- <parameters>
<parameter name="event_a" type="string">
<parameter name="host_name" type="string">
- <event-def name="e2" type="basic">
- <parameters>
<parameter name="service_name" type="string">
<parameter name="host_name" type="string">
<parameter name="price" type="number">
- <event-def name="e3" type="basic">
- <parameters>
<parameter name="eve_3" type="string">
- <event-def name="e4" type="basic">
- <parameters>
<parameter name="e4_param" type="number">
- <event-def name="sit1" type="composite">
<detect-event>e3
<no-detect-event>
- <event-selector name="">
<condition>con1
<scope>global
- <events>
<event-ref type="type">e1
<event-ref type="type">e2
- <detector>
- <sequence>
<event-ref name="order">e1
<event-ref name="sales">e2
- <event-def name="sit2" type="composite">
<detect-event>e3
<no-detect-event>
- <event-selector name="">
<condition>
<scope>global
<events>
- <detector>
- <and>
<event-ref name="sdfsd">e1
<event-ref name="event_2">e2
- <condition-defs>
- <condition-def always-true="no" composite="no" name="con1">
- <parameters>
- <parameter name="param1">
<event-ref type="type">e1
<param-ref>event_a
<instance>last
<function>
<key>no
- <expressions>
- <expression name="cond_one">
- <lhs>
<param-ref>param1
<operator>equal
- <rhs>
<value>1
- <composite-condition>
<not>
<condition-ref>cond_one
- <action-defs>
- <action-def name="action1">
<action-item type="script" name="act1">/root/helllo.sh
<action-def name="action2">
- <global-filter-defs>
- <global-filter name="filter1">
<in-event>e1
<out-event>e1
<condition-ref>con1
- <mappings>
-
event_a
<destination>host_name
|
|
|
|
|
You might want to repost this question, but check the "Do not treat <'s as HTML tags" checkbox before you click Submit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What .NET class can I use to query the user rights of the user currently logged in?
|
|
|
|
|
Can anyone please explain the difference between these ?
|
|
|
|
|
The dataset keep changes in memory from the last time you call acceptchanges() method. If you call update(), then it will generate the corresponding sql command to write those changes back to the source database. If you call the acceptchanges() method, it will clear up the buffer without interacting with the source database.
Asura
|
|
|
|
|
AcceptChanges only updates your rows in the (in memory) dataset, that is - marks them as "not needed for actual database update". If you want to update your rows to the database, call your tableadapter's Update method. This method will call AcceptChanges on your rows if the rows get successfully updated to the database. The point here is, you should only call AcceptChanges on your rows, if you don't want them to be sent to your database to update records.
|
|
|
|
|
Hi,
I have problem when using transaction in .NET.
I use SqlTransaction object. I am also using dialup connection
to connect to my server. On server I have database install in MSDE.
In code below I have to save some parent-child data.
this.cn.Open();
if( this.cn.State == ConnectionState.Open )
{
tx = this.cn.BeginTransaction(System.Data.IsolationLevel.ReadUncommitted);
this.daParent.InsertCommand.Transaction = tx;
this.daDetail.InsertCommand.Transaction = tx;
this.daParent.Update(ds);
this.daDetail.Update(ds);
// DialUp connection break here
tx.Commit();
bOK = true;
}
}
catch(Exception exp)
{
bOK = false;
try
{
tx.Rollback();
}
catch (Exception ex)
{
MessageBox.Show("An exception of type " + ex.GetType() + ex.Message +
" was encountered while attempting to roll back the transaction.");
}
strError = "The following exception occured: " + exp.Message;
MessageBox.Show(strError);
}
finally
{
if( this.cn.State == ConnectionState.Open )
this.cn.Close();
}
As you can see I use Read uncommitted isolation level.
If my dialup connection break before tx.Commit command my Parent and child table will be locked.
When I start SQL Enterprise manager I can not see data in that tables.
The error code is 1222 (Lock request time-out period exceeded.)
So, if I start program on the other machine and try to look data in that tables I can't
see them because my tables are still locked.
Does anyone have any sugesstion how to solve this problem.
Thanks
Mikica
|
|
|
|
|
Put the transaction handling in a stored procedure instead.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa,
I'm calling two store procedure!
|
|
|
|
|
Make one that does the work instead, so that the transaction doesn't have to leave the database server.
---
b { font-weight: normal; }
|
|
|
|
|
Class B includes a method "public void Save()".
Class A includes one field which type is B.
In some other class I am using reflection to gather information about class A and B:
<code>
{
Type ClassType = typeof(refl.A);
FieldInfo[] fields = ClassType.GetFields();
foreach(FieldInfo f in fields)
{
Type t = f.FieldType;
MemberInfo[] members = t.GetMembers();
foreach (MemberInfo m in members)
{
if (m.Name == "Save")
{
<big> ?????
</big>
}
}
}
}
</code>
When I find a function Save, i would like to call it. This isn`t a static method so I need to call it over some object. How to make it inside reflection?
----------------------------------------------------------------
The solution is:
public class B
{
public void Show()
{
System.Windows.Forms.MessageBox.Show( "B.Show called!" );
}
}
public class A
{
private B mB;
public B MemberB
{
get
{
return ( this.mB );
}
set
{
this.mB = value;
}
}
public A()
{
this.mB = new B();
}
}
public Class Tester
{
private A mA;
public void Do()
{
object lB;
lB = this.mA.GetType().GetProperty("MemberB").GetValue(this.mA, null );
lB.GetType().InvokeMember("Show",System.Reflection.BindingFlags.InvokeMethod, null, lB, new object[] { } );
}
}
How to make that without using properties at all?
|
|
|
|
|
What is it that you are trying to do, really? Why are you using reflection for this?
---
b { font-weight: normal; }
|
|
|
|
|
I am writing my own de/serialization and I need this to serialize object, that consist of other objects. Each of these objects will have a special function to serialize itself. I don`t want to make property to all fields, it`s a waste of time
|
|
|
|
|
I don't see any reason to use reflection to do this, if you have control over the objects yourself. There are loads of well behaving object oriented ways to handle it.
Why not make an interface containing a method for the object to serialize itself, and let the objects implement it. Each object would be responsible for calling it's own members to serialize them.
---
b { font-weight: normal; }
|
|
|
|
|
The idea is not to write anything special to every object. And the normal serialization is not possible, since it cannot accept multiple-dim arrays
|
|
|
|
|
I want to store password in database as encrypted. How can I do that?. Please somebody forward me an API for Encrypt/Decrypt in C#.NET
Suseel Kumar P
|
|
|
|
|
I got some source to enchiper and dechiper, if you want I could send you the code...
It's the safest algorithm ever developed, but you'll need a really long password for it to be that safe...
Niklas Ulvinge aka IDK
|
|
|
|
|
It's 2 methods to be more secure password in DataBase:
1) Encript with RSA256 or higher, more examples is on MSDN
Primary key store in DB, other key in App.
For more secure, protect Application with .NET Reactor from http://www.eziriz.com/[^]
This tool not freeware, but cost not to much and protecting .NET .exe
files Well;)
2) Other method is use only MD5 checksum and compare from DB pass, so encript
entered password with MD5 and compare value with DB password what is in MD5.
|
|
|
|
|
The safest way to store the password is to add some salt to it (please keep the salt somewhere safe and secure too!), encrypt the password using your favorite high-strength algorithm, then store the generated hash in the database. When you have to validate a password, put the attempted password through the same routine and compare the generated hash to what stored in the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to write a windows application in C#. I met a problem when I try to use the OdbcCommandBuilder to update the database. The connection works fine. The code is like following:
OdbcDataAdapter adapter = new OdbcDataAdapter("select * from machine", _connection);
OdbcCommandBuilder cb = new OdbcCommandBuilder(adapter);
DataRow arow = _ds.Table["machine"].newrow();
arow["StockNo"] = "abc01";
_ds.Table["machine"].rows.add(arow);
adapter.Update(_ds, "machine");
_ds.Table["machine"].AcceptChanges();
When I try to run this code to insert a new machine record, it gives me an error message which says
"ERROR [07006] Restricted data type a attribute violation (SQL_C_NUMERIC)"
Could somebody solve this problem for me please???
Thanks in advance
Asura
|
|
|
|
|
This may cause of missmatch in data types. Please try to check your stored prodecure or table structure for more information about data type.
Note : Especially feild have NUMERIC Data Type
Sreejith Nair
[ My Articles ]
-- modified at 6:56 Thursday 22nd September, 2005
|
|
|
|
|
Yes, you are right, in the machine table there are two field which is defined as decimal(10,2). When I delete the two fields, it works fine now. But I still need the two fields as the currency field. Do you know what can I do for the type conflict please?
Asura
|
|
|
|
|
Use a floating point type instead, like real/float/single/double (name depends on database interface).
---
b { font-weight: normal; }
|
|
|
|
|
There i issue with decimal feild untile you passes such feild through your code. I would like to point a block of code which is posted by you.
DataRow arow = _ds.Table["machine"].newrow();<br />
arow["StockNo"] = "abc01";<br />
_ds.Table["machine"].rows.add(arow);<br />
adapter.Update(_ds, "machine");<br />
_ds.Table["machine"].AcceptChanges();
As per you last comment you have two more feild with decimal value. But you are inserting only one value through your code. I nevar mean this is the reason of your entire dificulty.
DataRow arow = _ds.Table["machine"].newrow();<br />
arow["StockNo"] = "abc01";<br />
arow["Price"] = ConvertTo.Decimal(GrandTotal)<br />
arow["GrandTotal"] = ConvertTo.Decimal(GrandTotal)<br />
_ds.Table["machine"].rows.add(arow);<br />
adapter.Update(_ds, "machine");<br />
_ds.Table["machine"].AcceptChanges(); Try tis code.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hi There,
I would like to drag some selected text in a textbox and drop in some other locaiton of the same textbox.Now my question is while dropping how to find the cursor position so that i cna append the dropped text to the previous text.
Thanks in advance,
Cheers,
Manohar.
Thanks & Regards,
Manohar
|
|
|
|