subsonic

Error with SubSonic 2.0.3

Hi, I have to work on an application which used Subsonic 2.0.3. When I opened the project,I got a message The projectfile 'C:\Program Files\Subsonic\Subsonic 2.0.3\src\SubSonic\SubSonic.csproj' has been moved, renamed or is not on your computer. Does it mean I need to install Subsonic 2.0.3, I tried to find the same version but could ...

Transactions not working for SubSonic under Oracle?

The following code sample works perfectly under SQL Server 2005: using (TransactionScope ts = new TransactionScope()) { using (SharedDbConnectionScope scope = new SharedDbConnectionScope()) { MyTable t = new MyTable(); t.Name = "Test"; t.Comments = "Comments 123"; ...

Subsonic 3.0 Left Joins (again)

Hi, I've read many posts on Subsonic 3.0's LINQ left join issues, and how using the fluent interface is supposed to be the alternative. However, no matter which type of join I try to use in the fluent interface (LeftOuterJoin, LeftJoin...), the query is -always-, no matter what, an Inner Join once it gets translated in SQL I'm having i...

Executing sequential stored procedures; works in query analyzer, doesn't in my .NET application

Hello, I have an audit record table that I am writing to. I am connecting to MyDb, which has a stored procedure called 'CreateAudit', which is a passthrough stored procedure to another database on the same machine called MyOther DB with a stored procedure called 'CreatedAudit' as well. In other words in MyDB I have CreateAudit, which d...

Using constructor to load data in subsonic3?

I'm getting an error while trying to load an record through the constructor. The constructor is: public Document(Expression<Func<Document,bool>> expression); and i try to load a single item in like this var x = new Document(f=>f.publicationnumber=="xxx"); publicationnumber isn't a key but tried making an it an unique key and stil...

configurar subsonic 3.0 en proyecto con capas

proyecto: -capa de datos: - palntillas t4 active record -clases generadas por la plantilla -app.config con connectionstring -capa de negocio: -clases de negocio que usan la capa de datos -interfaz windows: --app.config con connectionstring quiero dejar un solo ...

SUBSONIC 3.0.0.3 Subsonic.Query.SqlQuery

New to subsonic and having issues figuring it out. I am simply just trying to do a distinct search and any documentation I find is telling me to use the class/method SubSonic.SqlQuery Though I am finding out that since I am using the newest version, a lot of the documentation I am finding does not apply. For example, I am getting this ...

ASP.Net MVC Database Driven Menu Strange HTML output

I have a database driven menu Helper that gets called from within my master page: <div class="topBar"> <%= Html.MenuTree(39, false, "first", "last") %> <div class="clear"></div> </div> Below is the code that outputs my HTML unordered list. The problem is that sometimes the output of the menu is completely wron...

AutoIncrement in SQLite with Subsonic 3

This is probably a simple matter, but when I create a new object, the ID property starts off as 0 rather than null. As I understand it, SQLite takes/needs a value of null for the PK column to do the AutoIncrement. So the short question is how to get the ID in the object to start life as null? Thanks cooter ...

SubSonic LInq IRepository

Trying to use SubSonic 3.0.0.4's Linq TEmplates. Got everything working. But in the Doc's I'm seeing how I can use aa IRepository to bulk insert, update, delete my db. Thing is - It wasn't included in the download. Is it somewhere else and I simply overlooked it? I've got a ton of updates going from one "Save" call - so this would b...

help req for subsonic for oracle database

i m using subsonic with sqlserver its working fine. now wat changes for oracle database req in app.cof ??? .....plz help me ........thanx in advance. ...

SQLiteException and SQLite error near "(": syntax error with Subsonic ActiveRecord

I ran into an interesting error with the following LiNQ query using LiNQPad and when using Subsonic 3.0.x w/ActiveRecord within my project and wanted to share the error and resolution for anyone else who runs into it. The linq statement below is meant to group entries in the tblSystemsValues collection into their appropriate system and ...

return distinct records using subsonic 3 query and VB

I have been having issues trying to return distinct records from a subsonic3 query using VB. My base query looks like so: Dim q As New [Select]("Region") q.From("StoreLocation") q.Where("State").IsEqualTo(ddlState.SelectedValue) q.OrderAsc("Region") This returns duplicates. How can I add a distinct cl...

Unit Testing with SubSonic, ActiveRecord and SqlQuery

I'm trying to use the built-in testing features of Subsonic 3.0.0.4 by setting my connection string to "Test". My data access routines use the SqlQuery class. When I try to run a test against the "in-memory" repository, I receive this error: System.ArgumentException: Format of the initialization string does not conform to speci...

Subsonic result doesn't match query

Hello I'm running into a big problem here... I had a database in a hosting and everything was going fine. Now I've changed the database to another hosting and just one query is giving me problems. I'm getting results from a view and the result is nothing like the results produced by the other database even do the data is same and the vi...

Delete with subsonic

I've had problems with the update method in subsonic, so instead of using: a.Update() I used var qry = dbAnimals.Update<Notification>(). Set(n => n.NotName == notification.NotName). Set(n => n.NotRecStatus == notification.NotRecStatus). Set(n => n.NotModified == notification.NotModified...

Exception with Subsonic 2.2, SQLite and Migrations

Hi, I'm playing with Migrations and created a simple migration like public class Migration001 : Migration { public override void Up() { TableSchema.Table testTable = CreateTableWithKey("TestTable"); } public override void Down() { } } after executing sonic.exe migra...

Subsonic, child records, and collections

Hi, I've been working with subsonic for a few weeks now, and it is working really well. However, I've just run into an issue with child objects with additional partial properties. Some of it is probably me just not understanding the .Net object lifecycle. I have an object - search. This has a few properties like permissions and stuff, ...

What might cause the IsNew bit to get set on my old SubSonic ActiveRecords?

I noticed that sometimes when I saved a changed record SubSonic would create a new record. I wrote a method that I could call to check the IsNew bit on the record at various times in my process. I can't find any consistency here, but at various times my call would discover that the NewBit was true. Any suggestions as to what could be cau...

Inserting "null" (literally) in to a stored procedure parameter.

I'm trying to insert the word "Null" (literally) in to a parameter for a stored procedure. For some reason SqlServer seems to think I mean NULL and not "Null". If I do a check for IF @LastName IS NULL // Test: Do stuff Then it bypasses that because the parameter isn't null. But when I do: INSERT INTO Person (<params>) VALUES (<stuff...