I'm using subsonic 2.2 in an app. I'm running a little complicated query in I have used both "And" and "Or" for a field, I'm little confused about how it is going to be translated into sql statement
MytableCollection col = DB.Select().From("mytable").Where("prop1").IsEqualTo(obj.prop1)
.And("prop2").IsEqualTo(obj.prop2)
...
In Nhibernate you start a session by creating it during a BeginRequest and close at
EndRequest
public class Global: System.Web.HttpApplication
{
public static ISessionFactory SessionFactory = CreateSessionFactory();
protected static ISessionFactory CreateSessionFactory()
{
return new Configuration()
.Configure...
I am using SubSonic version 2.2, but using the SubCommander command line tool, integrated into Visual Studio as an External Tool. I have some tables that are prefixed with 3 alpha-numeric characters, and an underscore. For example, the tables look something like this:
ABC_Table1
ABC_Table2
ABC_Table3
ABC_Table4
ABC_Table5
... and so...
Hello everyone,
I've been using Sub Sonic 3.x.x.x and i've come across something i need help with.
I'm using an abstract class and a factory pattern etc..
and this is basically the problem:
public abstract class Person
{
}
public class Male : Person
{
}
public class Female : Person
{
}
....
how do i get this to work
String personTy...
Hey there,
I've got a pretty basic setup in Visual Studio 2008 - Website project referencing my Class library project. SubSonic 3 is referenced from both projects, but the Template has been modified for my MySQL db. It connects and generates the most of code (Accept for StoreProcs for some reason), and the namespace is there, and my ...
I'm new to Subsonic and I work primarily with Oracle databases. Can subsonic be used against an Oracle database and does it support the use of Oracle's ODP.NET data provider.
If yes, can you point me to a good example?
Thanks in advance.
Scott
...
I'm getting an SqlException when I call Find() on a non-primary key field. I only experience this when I make this call in VB.
Details:
SubSonic 3.0.0.3 and ActiveRecord
Visual Studio 2008 solution
SubSonic and T4 templates in a C# class library project
My VB application in a separate project referencing the SubSonic project
In m...
this codes works fine on SQL Express 2008:
return _repository.GetInstructions()
.Where(x => x.PublishedDate != null)
.OrderByDescending(x => x.PublishedDate)
.First();
but when run using SQL Server 2000 , it breaks.
here is the error. I'll post the trace if someone wants to see it.
FailedSystem.Data.SqlC...
I'm getting a familiar Timeout SqlException when I add a lot of new records quickly using Subsonic ActiveRecord and Sql Server.
Timeout expired. The timeout period
elapsed prior to obtaining a
connection from the pool. This may
have occurred because all pooled
connections were in use and max pool
size was reached.
I hav...
I know this may have been answered but SubSonic 2.2 causes an error in the SQL provider when trying to do a Left join (Left inner join to subsonic)
instead of creating SQl like
SELECT * FROM table1
LEFT JOIN table 2 ON table1.id = table2.id
it creates:
SELECT * FROM table1
LEFT INNER JOIN table 2 ON table1.id = table2.id
and this ...
I am struggling pulling a simple list of records from one table object and printing them out.
I have a table called [Acceptance] that has four fields, two of which allow nulls. Here is the ddl for the schema object:
CREATE TABLE [dbo].[Acceptance](
[AcceptanceID] [int] IDENTITY(1,1) NOT NULL,
[AcceptanceCode] [nvarchar](2) NOT...
Is there any way to tell SimpleRepository not to include certain properties/Fields on Update()/UpdateMany()?
Alternative also is "Only properties with changes are to be updated".
...
I'm using Subsonic 3.0.0.3 for a new project and on one of my pages I'm wanting to display only 5 records that are the top 5 read records. My SQL select statement is
select top(5) * from myTable order by reads desc
Is this possible to do with ActiveRecord? If it is I haven't came across how yet.
Jon
...
I just hooked up Subsonic to MySql for the first time. Everything seems to be cool except a simple:
wp_1_post.All().ToList();
throws:
Object of type 'System.UInt64' cannot be converted to type 'System.Int64'.
It looks like the ID column in the wp_1_posts table is an unsigned bigint, just not sure what to do about it...
...
Hello,
I want to use SubSonic 2.1 to connect to 2 different databases (each having different tables). What is the best way to do this? What is the best way to seperate the generated code between the 2 databases and how can I switch between databases?
...
Hi there,
I'm writing a windows service that import an XML file into a SQLite database.
There are 3,000 odd records that need to be created and i'm using SubSonic 2.2 for the project.
Instead of looping through a list and adding them to the database one by one is there a way to batch query more than 1 new record at a time.
I know the...
I'm using Subsonic 3.0.0.3 Active Directory.
During program work, opens many connections to MySQL data base. I can see this threads in MySQL Administrator.
I'm working with data base in this case:
var db = new DB();
var nClient = Enumerable.First(db.clients, c => c.id_client == cl.ID);
nClient.data = data;
nClient.Update();
another ex...
Hi,
I have a long running process - Windows Service which is using SubSonic 2.2 for database access - in this case, accessing a SQL 2005 database. (I can't move to SubSonic 3, as we can't use .NET 3.5)
This service is polling a database table (amongst other things). I would like to handle the event where it loses the database connectio...
I've been using SubSonic (ActiveRecord) for a couple of years. I've been waiting until a few of the bugs in 3.0 were fixed before downloading the newest release and upgrading my few sites that use SubSonic to 3.0. I'm currently using 2.2 on these sites. I'm working on a new site and wanted to use 3.0 to get a grip on the new updates befo...
Hi!
I need to intercept the Save method, do some validations, alter some properties and then let it go again normally.
How can I do this?
Thanks!
Alex
...