Search found 1710 matches

by StanislavK
Wed 02 Jan 2013 15:46
Forum: LinqConnect (LINQ to SQL support)
Topic: WHERE clause with optional dynamic clause
Replies: 2
Views: 1058

Re: WHERE clause with optional dynamic clause

You can prepare the query in the following way:

Code: Select all

var query = from c in TBLNames
            where c.FirstName == 1
            select c;
if (id != null)
  query = from c in MyNames
          where c.ID == id
          select c;
MyNames = query.Take(10).ToList();
As LINQ queries are deferred, no actual SQL is performed until you enumerate your collection.
by StanislavK
Sat 29 Dec 2012 16:18
Forum: dotConnect for Oracle
Topic: Full Temp Space Bug with CLOB Fields in Direct Mode
Replies: 13
Views: 15368

Re: Full Temp Space Bug with CLOB Fields in Direct Mode

We have fixed the issue with freeing temporary tablespace when creating multiple LOBs in the Direct connection mode. The fix is available in the latest 7.4.146 version of dotConnect for Oracle.

The new build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with an active subscription only).
by StanislavK
Sat 29 Dec 2012 13:44
Forum: LinqConnect (LINQ to SQL support)
Topic: How to create a Clob output parameter
Replies: 5
Views: 1773

Re: How to create a Clob output parameter

Thank you for clarification. Unfortunately, the IDbParameter interface has no property that can be used for setting provider-specific types.

As a workaround for this, you can, e.g., do the following:
  • create an OracleParameter descendant;
  • override the Size property in the following way:

    Code: Select all

    public override int Size {
      get { return base.Size; }
      set {
        base.Size = value;
        if (DbType == DbType.String && Size > 4000)
          this.OracleDbType = OracleDbType.Clob;
      }
    }
  • when you need to use CLOBs, set the size to something larger than 4000.
Or, you can try setting the value to a large string before using the parameter.

Please tell us if this helps.
by StanislavK
Sat 29 Dec 2012 13:40
Forum: LinqConnect (LINQ to SQL support)
Topic: LinqConect MVC example needed
Replies: 4
Views: 1375

Re: LinqConect MVC example needed

The FirstNames collection is a list of strings, hence 'item' is just a string.

If you want to pass, e.g., contact objects to the view, you should expose them instead:

Code: Select all

public class Contacts {
  public IList<TBLCONTACTNAME> All { get; private set; }

  public Contacts() {
    ...
    All = TBLCONTACTNAMEs.ToList();
  }
}
In this case, elements of the Contacts.All collection are 'full' contacts with the FirstName property.
by StanislavK
Fri 28 Dec 2012 17:40
Forum: dotConnect for Oracle
Topic: Lose Connection on Session Timeout ASP MVC and Silverlight
Replies: 6
Views: 2116

Re: Lose Connection on Session Timeout ASP MVC and Silverlight

Sorry for the delay. We send you a sample project with a simple query performed against a DataContext.

We tried to reproduce the issue in the following way:
- published this application on the local IIS;
- set the idle timeout to 1 minute;
- run the application (at which moment the query is performed for the first time);
- waited till the timeout elapses;
- accessed the published application again.
In our environment, no error occurred.

Please specify if you can reproduce the issue with this application (in which case there should be some differences in the IIS configuration) or after modifying this application (in this case, please describe the changes you made).

Also, did you try updating to the latest version of LinqConnect/dotConnect for Oracle? There were multiple changes since LinqConnect 3.1.34, which could fix this particular issue.
by StanislavK
Fri 28 Dec 2012 17:39
Forum: LinqConnect (LINQ to SQL support)
Topic: How to create a Clob output parameter
Replies: 5
Views: 1773

Re: How to create a Clob output parameter

Changing the parameter type to CLOB is an expected behaviour, as VARCHAR2 maximum size is limited. As I can understand, you are encountering some problems when working with CLOB output parameters. Could you please describe these problems in more details? E.g., are you getting an exception? If yes, please specify its message and stack trace.

To change this behaviour, you can, e.g., create an OracleParameter descendant and override the Values property in it, so that OracleDbType is not changed when passing a large string.
by StanislavK
Fri 28 Dec 2012 17:38
Forum: LinqConnect (LINQ to SQL support)
Topic: LinqConect MVC example needed
Replies: 4
Views: 1375

Re: LinqConect MVC example needed

From what is written, you are passing a Contacts object to (which is not a collection) the view, and then trying to enumerate this object.

The correct way can be to, e.g., expose the name list via a property:

Code: Select all

public class Contacts {

  public IList<string> FirstNames { get; private set; }

  public Contacts() {
    ...
    FirstNames = 
      (from c in TBLCONTACTNAMEs 
      select c.FirstName)
      .ToList();
  }
}
Then you can access this property in the view:

Code: Select all

  @foreach (var item in Model.FirstNames)
  {
    @Html.Encode(item.FirstName)
  }
Also, I'm sending you an ASP.NET MVC sample with the repository and inversion of control implementation. Please check that your mail filter is not blocking the letter.
by StanislavK
Fri 28 Dec 2012 13:38
Forum: LinqConnect (LINQ to SQL support)
Topic: Creating DataContext with opened Connection
Replies: 6
Views: 1348

Re: Creating DataContext with opened Connection

We've contacted you by mail, please check that the letter was not blocked by your mail filter.
by StanislavK
Fri 23 Nov 2012 17:27
Forum: dotConnect for Oracle
Topic: Specified Cast invalid after upgrade
Replies: 11
Views: 1665

Re: Specified Cast invalid after upgrade

We have fixed this issue. The fix will be available in the nearest build, which we plan to release next week.
by StanislavK
Fri 09 Nov 2012 17:51
Forum: LinqConnect (LINQ to SQL support)
Topic: Extend Database with new objects
Replies: 10
Views: 2188

Re: Extend Database with new objects

As far as I can understand, you can use TPH inheritance for this. I.e., create all additional columns (one for the flag plus those corresponding to the descendant entity properties) in the table, and then configure the inheritance in your model. See the corresponding article for more information:
http://www.devart.com/linqconnect/docs/Inheritance.html

Please tell us if this helps.
by StanislavK
Tue 11 Sep 2012 15:52
Forum: dotConnect for SQLite
Topic: Arithmetic operation resulted in an overflow
Replies: 3
Views: 5037

Re: Arithmetic operation resulted in an overflow

We have analyzed the test project. The problem is that the 'add_text' column of the 'exam_figure' table is mapped to a property of the 'sbyte?' type, but a row in the table has the value larger than 127 in its 'add_text' cell. Thus, the error occurs when trying to assign this value to the 'sbyte?' AddText property of an ExamFigure object.

To resolve the issue, you can either map the AddText property to, e.g., Int32, or ensure that the table contains only proper 'sbyte' values.
by StanislavK
Tue 11 Sep 2012 11:42
Forum: dotConnect for MySQL
Topic: System.ArgumentException: Property set method not found.
Replies: 15
Views: 11097

Re: System.ArgumentException: Property set method not found.

Entity Developer uses T4-like templates to generate code for models. The default template does not generate setters for read-only properties. To change this behaviour, please modify the template:
  • Find the template in the Templates node of the Model Explorer tool window.
  • In the context menu, select the 'Copy to Model Folder' item. At this point, the template will be added to your solution and so you will be able to modify it.
  • Open the template and find the following entry:

    Code: Select all

    if (!property.ReadOnly) {
  • Remove the code block that contains it, as well as the code block that contains the corresponding closing curly brace.
  • Save the template and re-generate the code for the model. At this point, read-only properties should have setters.
As for the cast issue, please specify the following:
  • the exact server data type used for the problem column (e.g., 'bigint(20)');
  • whether the .NET data type of the corresponding property is Int32 or Int64;
  • a sample scenario in which the issue can be reproduced (e.g., inserting a new entity, or querying the table with a condition like 'LongProperty == 1').
We are sending you a test application, please change it so that the problem can be reproduced, or send us your sample.
by StanislavK
Mon 10 Sep 2012 12:19
Forum: dotConnect for MySQL
Topic: Reflection CopyDataMembers
Replies: 4
Views: 1368

Re: Reflection CopyDataMembers

We've answered you in the other topic:
http://forums.devart.com/viewtopic.php?t=24838
by StanislavK
Mon 10 Sep 2012 12:18
Forum: dotConnect for MySQL
Topic: System.ArgumentException: Property set method not found.
Replies: 15
Views: 11097

Re: System.ArgumentException: Property set method not found.

Sorry for the delay. The probable reason of the issue is that one of your entity's properties is read-only. We changed the default code generation template so that no setter is generated for read-only properties now. That is why reflection cannot change the property of the target object.

To resolve the issue, you can use one of the following options:
  • Disable the Read-Only option for your properties.
  • Modify the template so that setters are generated for all properties. To do so, find and remove the code block that includes 'if (!property.ReadOnly) {' (and the block where the curly brace is closed as well).
  • Instead of properties, access the underlying fields via reflection.
Please tell us if this helps.
by StanislavK
Thu 30 Aug 2012 16:34
Forum: LinqConnect (LINQ to SQL support)
Topic: Problems with version 4.0
Replies: 1
Views: 1235

Re: Problems with version 4.0

We've answered you by mail. Please confirm that you've received the letter.