• DiceMan
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi All,
 
i think i posted this somewhere else but i cant find it!
 
I have successfully conntecd our SQL server to salesforce.com using hte dataloader. it works great sending all the data unless on field is blank (null) then the whole job crashes;
 
this is the error i am getting:
Code:
(DatabaseContext.java:204) - Error creating PreparedStatement for the database configuration insertHangtagOrder. Error replacing parameter: FirstName with value: null of type: null. Sql error: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.. 
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver. 
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) 
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source) 
at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:165) 
at com.salesforce.lexiloader.dao.database.DatabaseContext.setSqlParamValues(DatabaseContext.java:197) 
at com.salesforce.lexiloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:143) 
at com.salesforce.lexiloader.action.visitor.QueryVisitor.writeExtraction(QueryVisitor.java:185) 
at com.salesforce.lexiloader.action.visitor.QueryVisitor.visit(QueryVisitor.java:111) 
at com.salesforce.lexiloader.action.ExtractAction.execute(ExtractAction.java:108) 
at com.salesforce.lexiloader.controller.Controller.executeAction(Controller.java:126) 
at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.java:136) 
at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.java:228) 

 
This job works great when all the feilds contain data and crashes every time there is a null.
 
any ideas? Salesforce suppost says they cant help coz its custom code...
 
Thanks

Dave
I have encountered a strange problem with a visualforce email template. When I preview the template everything seems to be fine. It appears as I expect in the preview window of the salesforce interface, and the test emails that I send to myself via the 'Preview' button arrive without a problem. However, when the approval process rule triggers the email to be sent the only thing that my users are receiving is an email with the subject only...the body of the email is completely blank! I have yet to figure out why this is, so if anybody has any suggestions I would be very grateful.
Code:
<messaging:emailTemplate subject="New Web-to-Trial Request requires your Approval" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
   <html>
     <body>
    
    <style type="text/css">
      p.regular {font-family: arial; size: 8pt;}
      p.small {font-family: arial; size 8pt; line-height: 100%}
    </style>  
    <p class="regular">
    <br>A New Trial Request has been submitted.</br>
    <br>Account: <apex:outputLabel >{!relatedTo.Account.Name}</apex:outputLabel></br>
    <br><apex:outputText >Requested By: {!relatedTo.Contact__r.Name}</apex:outputText></br> 
     <br>To approve, simply type 'Approved' in your response. You can also review the Opportunity or Approve online at https://emea.salesforce.com/{!relatedTo.Id}</br>
     </p>
     </body>
   </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 


Message Edited by AKall on 01-16-2009 01:26 PM
  • January 16, 2009
  • Like
  • 0
I have a list of a custom object that I display on a VisualForce page using a dataTable. The dataTable has four columns. The first is outputText, the second and third inputText, and the fourth inputCheckbox. The user modifies the contents of the inputText and inputCheckbox and then saves (updates). Initially everything works as expected. However after a few successful saves I always get the following error message:

<apex:inputText> element value must resolve to a String type!

If I log out, close the browser, and then return to the page I still get the error. I've read a few articles related to this type of functionality and my code seems to be using the correct approach.

Any thoughts on this?

Here is the code:

Code:
public class UpdateContractUsageStats {
 
        private final List<Contract_Usage_Data__c> ContractUsageData;
        
        public UpdateContractUsageStats() {
   
   ContractUsageData = [Select Id, Usage_Report_Interval_Label__c, Usage_Report_Date__c, UsageLives__c, UsageAmount__c, Usage_Report_Certified__c From Contract_Usage_Data__c Where Contract__c=: ApexPages.currentPage().getParameters().get('cid')];
        }
        
  public PageReference save() {
   try{
    update ContractUsageData;
   }
   catch(DmlException ex){
    ApexPages.addMessages(ex);
   }
   return null;
  }
        
        public List<Contract_Usage_Data__c> getContractUsageData(){
                return ContractUsageData;
        }
}

 
Code:
<apex:page controller="UpdateContractUsageStats">
 <apex:messages />
    <apex:form >
        <apex:dataTable value="{!ContractUsageData}" var="intervalData" id="theTable" rowClasses="odd,even" styleClass="tableClass">
            <apex:column width="25%">
                    <apex:facet name="header">Interval</apex:facet>
                    <apex:outputText value="{!intervalData.Usage_Report_Interval_Label__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Lives</apex:facet>
                    <apex:inputText value="{!intervalData.UsageLives__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Amount</apex:facet>
                    <apex:inputText value="{!intervalData.UsageAmount__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Certified</apex:facet>
                    <apex:inputCheckbox value="{!intervalData.Usage_Report_Certified__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
        </apex:dataTable>
        <apex:commandButton value="Update Statistics" id="theButton" action="{!save}"/>
    </apex:form>
</apex:page>

 


  • October 16, 2008
  • Like
  • 0
Hi All,
 
i think i posted this somewhere else but i cant find it!
 
I have successfully conntecd our SQL server to salesforce.com using hte dataloader. it works great sending all the data unless on field is blank (null) then the whole job crashes;
 
this is the error i am getting:
Code:
(DatabaseContext.java:204) - Error creating PreparedStatement for the database configuration insertHangtagOrder. Error replacing parameter: FirstName with value: null of type: null. Sql error: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.. 
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver. 
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) 
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source) 
at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source) 
at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:165) 
at com.salesforce.lexiloader.dao.database.DatabaseContext.setSqlParamValues(DatabaseContext.java:197) 
at com.salesforce.lexiloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:143) 
at com.salesforce.lexiloader.action.visitor.QueryVisitor.writeExtraction(QueryVisitor.java:185) 
at com.salesforce.lexiloader.action.visitor.QueryVisitor.visit(QueryVisitor.java:111) 
at com.salesforce.lexiloader.action.ExtractAction.execute(ExtractAction.java:108) 
at com.salesforce.lexiloader.controller.Controller.executeAction(Controller.java:126) 
at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.java:136) 
at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.java:228) 

 
This job works great when all the feilds contain data and crashes every time there is a null.
 
any ideas? Salesforce suppost says they cant help coz its custom code...
 
Thanks

Dave