Please if anyone knows the answer, I´m still looking for 3 days and nothing..
I make some test with subsonic, SqlServer and MySql and with some little changes in the web.config file everything was good.
But now, I need to work with Oracle . I maked the changes and next command runs
DataTable qry = ModeloDados.DB.Select().From("CARGO").ExecuteDataSet().Tables[0];
But if i type the ModeloDados. the class doesn´t appear. Ony appear the next :
DB , Schemas , SPs , Tables , Views
With the SqlServer or MySql everything is good.The class Cargo appear. I think it´s not configuration in the Oracle because the above command runs, but i need to work with the class
some like Cargo c = new Cargo
But the class doesn´t appear.
There something i missing ?
Thanks for any help.
THE CONFIGURATION :
<connectionStrings>
<add name="oracle" connectionString="Data Source=xxx.x.xx.xx:1521/bancoteste;Persist Security Info=True;User ID=user;Password=xxx;" providerName="System.Data.OracleClient"/>
</connectionStrings>
<SubSonicService defaultProvider="oracle" enableTrace="false" templateDirectory="">
<providers>
<clear/>
<add name="oracle" type="SubSonic.oracleDataProvider, SubSonic"
fixDatabaseObjectCasing="true"
connectionStringName="oracle"
generateRelatedTablesAsProperties="true"
fixPluralClassNames="false"
generatedNamespace="ModeloDados"
regexIgnoreCase="true"
removeUnderscores="false"
setPropertyDefaultsFromDatabase="true"
generateNullableProperties="true"
useExtendedProperties="true" useUtc="true"/>
</providers>
</SubSonicService>
<compilation debug="true">
<buildProviders>
<add extension=".abp" type="SubSonic.BuildProvider, SubSonic"/>
My guess is that there are errors when the build provider runs against Oracle.
You'll need to hunt those down, perhaps by doing a build with SubCommander instead. I haven't used the build provider in a long time, but if memory serves, it's not that great at putting the errors into visual studio where you can see them.
Related
I use logback MDC to record my application defferent module's log, for example,
// 1. define a logger
org.slf4j.Logger mdclog = org.slf4j.LoggerFactory.getLogger("MY_LOGGER_NAME");
// record trade log
org.slf4j.MDC.put("MY_MDC_KEY", "trade_log");
mdclog.info("This is trade log");
// record goods log
org.slf4j.MDC.put("MY_MDC_KEY", "goods_log");
mdclog.info("This is goods log");
mdc config in logback.xml
<appender name="log_classify" class="ch.qos.logback.classic.sift.SiftingAppender">
<discriminator>
<Key>login</Key>
<DefaultValue>OTHER</DefaultValue>
</discriminator>
<sift>
<appender name="${MY_MDC_KEY}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<prudent>false</prudent>
<file>${LOG_PATH}/${MY_MDC_KEY}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${MY_MDC_KEY}_%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
</appender>
</sift>
</appender>
this generate two log file,
I want to record trade or goods sql log in defferent log file,
so I wonder if JOOQ does support this ?
I find a way to resove my question.
I put my appender into org.jooq.tools.LoggerListener,
<Logger name="org.jooq.tools.LoggerListener" level="DEBUG">
<appender-ref ref="log_classify" />
</Logger>
the jooq sql excute log will be add to defferent file after initialise my MDC.
Actually, I don’t know if this is a good idea
jOOQ doesn't integrate this deeply with loggers out of the box, but you can place your org.slf4j.MDC.put calls in an ExecuteListener prior to running a SQL query, for example in the ExecuteListener::renderEnd event, once the SQL statement is generated, and regex-match the query to make a decision. Alternatively, using a VisitListener, you can make this decision already earlier, trying to match specific tables that may be present in queries.
But quite probably, a much better place to initialise your MDC context would be on the service layer, because your service will probably also know if you're about to run "trade" or "goods" queries.
Basically the title itself kinda explains what i'm trying to achieve but in greater detail:
Let's say the one has similar to the following XML setup for the layout:
layout="<log level='${level:lowerCase=True}' time='${longdate:universalTime=true}' myCustomProperty1='${event-properties:item=myCustomProperty1}' myCustomProperty2='${event-properties:item=myCustomProperty2}'>${newline}
...."
Now when myCustomProperty1 is set to let's say 'blah1' but myCustomProperty2 is not added to eventInfo.Properties collection the resulting entry looks like following:
<log level='blah' time='blah' myCustomProperty1='blah1' myCustomProperty2=''>
...
The question is - what can be done (preferably in the config file) to exclude the myCustomProperty2 attribute from finally rendered result so the output looks as following:
<log level='blah' time='blah' myCustomProperty1='blah1'>
...
Here is the gotcha - the same logger is used by multiple threads so i can't simply alter target's layout configuration at the runtime since it may negatively affect the rest of the threads
Thank you in advance for your suggestions.
-K
You could try using When :
<variables>
<variable name="var_myCustomProperty1" value="${when:when=length('${event-properties:item=myCustomProperty1}')>0:Inner= myCustomProperty1="${event-properties:item=myCustomProperty1}"}"/>
<variable name="var_myCustomProperty2" value="${when:when=length('${event-properties:item=myCustomProperty2}')>0:Inner= myCustomProperty2="${event-properties:item=myCustomProperty2}"}"/>
</variables>
<targets>
<target name="test" type="Console" layout="<log level='${level:lowerCase=True}' time='${longdate:universalTime=true}'${var_myCustomProperty1}${var_myCustomProperty2} />" />
</targets>
NLog 4.6 will include the XmlLayout, that might make things easier:
https://github.com/NLog/NLog/pull/2670
Alternative you can use the JsonLayout, if xml-output is not a requirement (renderEmptyObject="false")
I am working on a Windows phone app in Visual studio 2012 and finding difficulties showing pub center ads. I have searched that we need to add certain capabilities reference : Windows phone ads not working, I have added all the capabilities but while adding "ID_CAP_MEDIA_LIB" its throws an error
"The Name attribute is Ivalid - The value "ID_CAP_MEDIA_LIB"is Invalid
according to its datatype 'string' - The enumeration constraint
failed."
Any help would be appreciated
Hum this capability doesn't not exit.
<Capability Name="ID_CAP_MEDIALIB_AUDIO" />
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
<Capability Name="ID_CAP_MEDIALIB_PHOTO" />
You need =>
ID_CAP_IDENTIFY_USER
ID_CAP_MEDIALIB_PHOTO
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_WEBBROWSERCOMPONENT
You can add an event handler to the Error Event on the AdControl, by catching that or adding a break point and drilling into the error event args you can normally pinpoint what the specific problem is or which capability your app is lacking during development.
As MatDev8 alluded to, it's probably best just to add capabilities through the wpmanifest UI.
I am trying to develop client side report in visual studio 2012. My report is working fine with different selection criteria variables. I am getting error while multi selected list values in filters. passing values as
<SelectParameters>
<asp:FormParameter DefaultValue="0" FormField="ctl00$MainContent$BasicFilterControls$ddlStartHour" Name="StartHour" />
<asp:FormParameter DefaultValue="0" FormField="ctl00$MainContent$BasicFilterControls$ddlStartMinute" Name="StartMinute" />
<asp:FormParameter DefaultValue="2012-11-01" FormField="ctl00$MainContent$BasicFilterControls$txtStartDate" Name="DateFrom" />
<asp:FormParameter DefaultValue="23" FormField="ctl00$MainContent$BasicFilterControls$ddlEndHour" Name="EndHour" />
<asp:FormParameter DefaultValue="59" FormField="ctl00$MainContent$BasicFilterControls$ddlEndMinute" Name="EndMinute" />
<asp:FormParameter DefaultValue="2012-11-01" FormField="ctl00$MainContent$BasicFilterControls$txtEndDate" Name="DateTo" />
<asp:SessionParameter DefaultValue="5027" Name="AgentList" SessionField="AgentList" />
</SelectParameters>
In query in need AgentId as SkillTargetID IN (#AgentList). when I pass single value as 5000 its working fine and showing records. But when I pass multiple values as 5000,5001,5002 etc then got error. Any suggestion to pass multiple values to report viewer.
I had tried with
5000,5001,5002
'5000','5001','5002'
(5000,5001,5002)
('5000'),('5001'),('5002')
I am trying this on visual studio 2012, Sql server 2008 r2 and .net framework 4.5.
Sill I couldn't find any proper solution but I solve my problem by changing DataSource SelectCommand query. On report refresh button_click I just change MyDataSource.SelectCommand query as
string AgentIds = "5000,5001,5002";
MyDataSource.SelectComamnd = "Select * from Agent where AgentId IN ('" + AgentIds + "')";
ReportViewer1.LocalReport.Refresh();
and it works. If anyone find a batter solution to add multiple values to DataSource variable then please update me.
folks!
I have project in cc.net and this project nay start by 3 ways
Forced (when user click button "force" in web
By project trigger
By sheduler trigger
After build server send mail to stackholders.
And now, i want to add trigger name to mail subject. e.g.
force_Project name ...buikd result
I have tried use variables:
<projectTrigger project="Someproject">
<triggerStatus>Success</triggerStatus>
<variable name="Trigger" value="commit" />
</projectTrigger>
and
<subjectSettings>
<subject buildResult="Broken" value="{Trigger} is broken" />
<subject buildResult="StillBroken" value="{Trigger} is still broken" />
</subjectSettings>
but this way doesnt have positive result.
What kind of way able help me?
You can use the fileLabeller of ccnet.
<tasks>
build tasks...
<fileLabeller>
<labelFilePath>c:\buildstuff\mybuild-label.txt</labelFilePath>
<allowDuplicateSubsequentLabels>false</allowDuplicateSubsequentLabels>
</fileLabeller>
</tasks>
Setup your build task to write to the contents of mybuild-label.txt. I write something like this.
[repo1 rev: 99, repo2 rev: 9999]
This will become part of the subject.