subsonic

Subsonic: Select on a View, locks the table update?

Hi, I have a Web site live and running now. I am using the Subsonic to handle the database connections etc. I am getting time out expired error while updating a table (say Employee). When I check sp_who2, I see the suspended connection for the PID which is updating with a block by anothor pid, so I run the profiler and found out when e...

.NET build error

Having added the subsonic 2.2 subcommander sonic.exe as an external tool I can generate my DAL classes in my defined \dataaccess\generated\ folder but when I build the project I get an error in the following file: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\subsonictest\bdf9ac02\aff68c1c\App_Code.2ygn7ole.0.cs ...

T4 templates don't work for me in my Visual studio 2008 solution

I download the latest version of Subsonic(3.0.0.3) but when I add the T4 templates in my solution in Visual studio 2008 SP1, the auto-generation don't work. If I right click on the template files also the "Run custom tools" is not present. What I have to do to make visual studio able to generate code from T4 templates? ...

SubSonic inner join mystery

I've have 2 tables CampaignCoverage and Coverage CampaignCoverage has a CoverageID column. Coverage has a column DateX. Basically I've not specified in the code that CampaignCoverage.CoverageID = Coverage.ID like you would to in SQL. How does this work at all????!!!! CampaignCoverageCollection campaignCoverages = new Select() ...

Subsonic - Return only certain columns/properties for display

I have a baseclass that handles returning data from the relevant class/table. I want to have some way of specifying the columns to display. Maybe have a public columns List that gets assigned with all column we want to display? This is what I have but its not right. public void SetupGrid<T>() where T : class, new() { ...

subsonic with oracle database

Can anyone advise on the best Oracle ASP.NET 3.5 ORM in the land..pros and cons? How good is Subsonic 3.0 with Oracle? Thanks ...

Specific Subsonic Queries Not Working on SQL Server 2000

I'm using Subsonic 3 and am just starting the process of putting my application into production. Locally, I develop using SQL Server 2008 but the production environment is using SQL Server 2000. I am getting the following error for paging: 'ROW_NUMBER' is not a recognized function name. Description: An unhandled exception occurred du...

Creating Subsonic Dynamic Query with numerous where clause

I have the following code which is in a base class. MyApp.MyDB = new MyApp.MyDB (); IRepository<T> repo = new SubSonicRepository<T>(db); CurrentTable = repo.GetTable(); var s = db.SelectColumns(columnList.ToArray()). From(CurrentTable.Name). OrderAsc(CurrentTable.Descr...

How to tell if user has modified data using bindingsource

I have a DataGridView bound to a bindingsource which is bound to a List<T>. The user clicks a row that goes to a form with textboxes etc. The textboxes are databound like so: if (txtID.DataBindings.Count == 0) txtID.DataBindings.Add("Text", bindingSource, "Title"); I want to be able to detect if the user has modified...

Has anyone got a demo Winforms app using Subsonic and Databinding

I am using Subsonic in a Windos app and have a gridview using a bindingsource which holds a ExecutedTypeList but I am having problems all over the place and am wondering whether DataSet/DataTable might be easier which is a real shame. Has anyone got this type of app to work successfully and if so do you have a demo app? ...

Should ActiveRecord DirtyColumns be cleared when calling Save

I am checking whether my class IsDirty, if so the user gets prompted to with a "do you want to Save" message. If they click yes, it calls a Save however I am stuck in a loop because Save does not clear out the dirty columns. Should it? *BUMP* ...

Subsonic 3 Sql Join using SimpleRepository can't join on columns with same name?

I'm trying to using the Subsonic Fluent query interface to create a simple inner join between two tables: [SearchJobResults] PK SearchJobResultId int Name string Desc string [ParseResults] PK ParseResultId int Name string SearchJobResultId int There is a 1 to 1 relationship between these tables. Keep in mind, I'm not using ActiveRe...

Use subsonic 3.0 to work with stored procedures

Hi I just downloaded subsonic 3.0 and I want to work with stored procedures. I don't know which template to choose: ActiveRecord or LinqTemplates. I don't really know the difference. I know that I don't want to deal with Linq code. I just want subsonic to generate classes based on tables and also their relationships (if possible) an...

Subsonic template for SQLite is incorrect

The SQLite.ttinclude (for VB) should have tbl.Schema=""; in the LoadTables procedure, otherwise the Struts.tt will not compile Running transformation: System.ArgumentNullException: Value cannot be null. Parameter name: objectToConvert at Microsoft.VisualStudio.TextTemplating.ToStringHelper.ToStringWithCulture(Object objectToConvert...

SubSonic 3.0 exception "'Public member 'ChangeTypeTo' on type 'Decimal' not found."

When saving a row that has an integer primary key following exception is thrown in the VB version: 'Public member 'ChangeTypeTo' on type 'Decimal' not found.' This happens in ActiveRecord.VB file : Public Sub SetKeyValue(value As Object) Implements IActiveRecord.SetKeyValue If value IsNot Nothing AndAlso value IsNot DBNull.Value T...

What is so great about ORM?

Hi, So I'm having a head against the wall moment and hoping somebody can come help either remove the wall or stop my head from moving!! Over the last 3/4 weeks I've been investigating ORM's in readyness for a new project. The ORM must map to an existing, large and ageing SQL database. So I tried Subsonic. I really liked v2 and v3 aft...

Most efficient way of loading data into LINQ object for search result type method

I currently have the following: public IEnumerable<News> NewsItems { get { return from s in News.All() where s.Description.Contains(SearchCriteria) || s.Summary.Contains(SearchCriteria) select s; } } The problem is I only need to return the one property that actually has the data as well as the Title proper...

Why does Subsonic create a class for my CoreData table as CoreDatum?

As the question says... does Subsonic not like the word Data so it changes it? ...

Subsonic 2.2 not updating sql changes in the V class

New to SubSonic, inherited it with a project that uses SubSonic 2.2.1 I have tried to added a column to one of my tables and run the tool to update the classes, The table name is Feedback and Feedback.cs added the new property but VFeedback.cs didn't, am I missing something? ...

Subsonic 3 - Passing null value to stored procedure parameter

Using Subsonic 3.0.0.3 is it feasible to pass a null value to a stored procedures parameter? If so, what is the appropriate way? Details Say I have an sp where one of the parameters has a default value like: CREATE Procedure Test_SPWithNullParams( @p1 int=null, @p2 varchar(50) ) AS SELECT 1 as Stuff Then in my code I want to...