|
hello,
i'm trying to use the DataSet in my drl file that's why i'm using the import tag in order to reference the System.Data library. But, i'm having an error telling me that the DataSet is not well referenced.Below, the code i'm writing in order to do the import <import>System</import> <import>System.Data</import> <dotnet:functions> public void ExtractFromDB() { DataSet dSet = new DataSet (); } </dotnet:functions> <rule name="REA Rule"> <parameter identifier="test"> <dotnet:class>System.String</dotnet:class> </parameter> <dotnet:condition> test.Equals("test")</dotnet:condition> <dotnet:consequence> ExtractFromDB(); Console.WriteLine("the dataset is true"); </dotnet:consequence> </rule> </rule-set> this is the error message i'm getting: The type or namespace name 'DataSet' could not be found (are you missing a using directive or an assembly reference?) Thanks for ur help, -- Eliane Daghfal |
|
possibly try import System.Data.DataSet or else fully qualify the namespace?
On 4/18/06, Eliane Daghfal <[hidden email]> wrote: > > hello, > > i'm trying to use the DataSet in my drl file that's why i'm using the > import > tag in order to reference the System.Data library. But, i'm having an > error > telling me that the DataSet is not well referenced.Below, the code i'm > writing > in order to do the import > > <import>System</import> > <import>System.Data</import> > <dotnet:functions> > public void ExtractFromDB() > { > DataSet dSet = new DataSet (); > } > </dotnet:functions> > > <rule name="REA Rule"> > <parameter identifier="test"> > <dotnet:class>System.String</dotnet:class> > </parameter> > <dotnet:condition> test.Equals("test")</dotnet:condition> > <dotnet:consequence> > ExtractFromDB(); > Console.WriteLine("the dataset is true"); > </dotnet:consequence> > </rule> > </rule-set> > > > this is the error message i'm getting: > The type or namespace name 'DataSet' could not be found (are you missing a > using directive or an assembly reference?) > > > Thanks for ur help, > > -- > Eliane Daghfal > > > |
|
In fact, i already tried this i also tried to assert an object of
type "DataSet" and i got the following error: ---- error CS0011: Referenced class 'System.Data.DataSet' has base class or interface 'System.ComponentModel.MarshalByValueComponent' defined in an assembly that is not referenced. You must add a reference to assembly 'System'. error CS0011: Referenced class 'System.Data.DataSet' has base class or interface 'System.ComponentModel.IListr interface 'System.Xml.Serialization.IXmlSerializable' defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml'. error CS0011: Referenced class 'System.Data.DataSet' has base class or interface 'SystemSource' defined in an assembly that is not referenced. You must add a reference to assembly 'System'. error CS0011: Referenced class 'System.Data.DataSet' has base class o.ComponentModel.ISupportInitialize' defined in an assembly that is not referenced. You must add a reference to assembly 'System'. --- That's why i tried also to enter these references in my drl but i always get the same error :( I took a look at the generated code and i realized that the use of import tag didnt include the libraries in the generated class I tried also to execute the following given example in Drools.Net and it didn't work .. -------------- <?xml version="1.0"?> <rule-set name="CSharpRuleSet" xmlns="http://drools.org/rules" xmlns:dotnet="http://drools.org/semantics/dotnet" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://drools.org/rules rules.xsd http://drools.org/semantics/dotnet dotnet.xsd"> <import>System</import> <import>System.Threading</import> <dotnet:functions> public void Sleep(int milliseconds) { Thread.Sleep(milliseconds); } </dotnet:functions> <rule name="SimpleRule"> <parameter identifier="text"> <dotnet:class>System.String</dotnet:class> </parameter> <dotnet:condition>text.Equals("Ready")</dotnet:condition> <dotnet:consequence>Sleep(2000)</dotnet:consequence> </rule> </rule-set> -- Eliane Daghfal |
|
Eliane,
Im not sure, but what about importing all this classes??... I dont know if <import>System.*</import> would work, but its worth a try. Tuesday, April 18, 2006, 6:37:08 AM, you wrote: > In fact, i already tried this i also tried to assert an object of > type "DataSet" and i got the following error: > ---- > error CS0011: Referenced class 'System.Data.DataSet' has base class or > interface 'System.ComponentModel.MarshalByValueComponent' defined in an > assembly that is not referenced. You must add a reference to assembly 'System'. > error CS0011: Referenced class 'System.Data.DataSet' has base class or > interface 'System.ComponentModel.IListr > interface 'System.Xml.Serialization.IXmlSerializable' defined in an assembly > that is not referenced. You must add a reference to assembly 'System.Xml'. > error CS0011: Referenced class 'System.Data.DataSet' has base class or > interface 'SystemSource' defined in an assembly that is not referenced. You > must add a reference to assembly 'System'. > error CS0011: Referenced class 'System.Data.DataSet' has base class > o.ComponentModel.ISupportInitialize' defined in an assembly that is not > referenced. You must add a reference to assembly 'System'. > --- > That's why i tried also to enter these references in my drl but i always get > the same error :( I took a look at the generated code and i realized that the > use of import tag didnt include the libraries in the generated class > I tried also to execute the following given example in Drools.Net and it didn't > work .. > -------------- > <?xml version="1.0"?> > <rule-set name="CSharpRuleSet" > xmlns="http://drools.org/rules" > xmlns:dotnet="http://drools.org/semantics/dotnet" > xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" > xs:schemaLocation="http://drools.org/rules rules.xsd > http://drools.org/semantics/dotnet dotnet.xsd"> > <import>System</import> > <import>System.Threading</import> > <dotnet:functions> > public void Sleep(int milliseconds) > { > Thread.Sleep(milliseconds); > } > </dotnet:functions> > <rule name="SimpleRule"> > <parameter identifier="text"> > <dotnet:class>System.String</dotnet:class> > </parameter> > <dotnet:condition>text.Equals("Ready")</dotnet:condition> > <dotnet:consequence>Sleep(2000)</dotnet:consequence> > </rule> > </rule-set> > -- > Eliane Daghfal -------------------------- Felipe Piccolini [hidden email] |
| Powered by Nabble | Edit this page |
