subsonic

Subsonic 2.2: Update only works for some fields?

MyTable.Update(long.Parse(id), txtLocation.Text, txtCode.Text, locale, chkAvailable.Checked, DateTime.Now); Neither chkAvailable.Checked or DateTime.Now cause an update but changing the other fields do... What's going on? I'm using SQL Server 2005. .NET 3.5 SP1 Rob ...

subsonic 3 - Object of type 'System.Byte[]' cannot be converted to type 'System.String'.

I have this piece of code that works fine in subsonic 2.2, I migrated to subsonic 3 but now i get this error 'Object of type 'System.Byte[]' cannot be converted to type 'System.String'.' subsonic 2.2 code in comment public IList<Tag> Tags { get { return Tag.Find(t => t.TypeId == 1 && t.ItemID == JobId).ToList(); ...

Bug in Subsonic 3.0.0.1? The ToString() override and DescriptorValue() cause errors

Hi, In my web app, Subsonic 3.0.0.1 seems to be generating the code from the templates correctly except for two methods: ToString() and DescriptorValue(). And those methods are fine for all the tables but one -- a table named ContentType. That shouldn't be a problem, correct? The error I receive for each of the aforementioned method...

Subsonic 3 - sp.ExcuteTypeList<T>() - sql_variant to varchar is not allowed

Hi I'm running subsonic 3 when trying to call a stored procedure ( sp.ExecuteTypedList() ) I get the error : Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query. Any idea on how to fix this ? ...

Subsonic not working with MySQL (5.0.51a)

I am trying to use Subsoinc 3.0.0.1 to connect to mysql db. I added dll reference and connection string to app.config Then I copied templates from ActiveRecord folder to folder in my solution and edited namespace and connection string but then i get this error: Error 10 Running transformation: System.Data.SqlClient.SqlException: A...

Subsonic out of memory exception

I am currently using Subsonic 2.1 and I am receiving an error message when I attempt to use Subsonic to pull back large amounts of data (@ 140,000 records) from an sql database table. Is there an configuration setting that I need to change in order to allocated more memory for my application to complete the task? ...

SubSonic 3 Simple Query Tool

I want to use the Simple Query tool in SubSonic 3(.0.0.2) and the docs page (http://subsonicproject.com/docs/Simple_Query_Tool) implies there's a way to easily get hold of table column names (e.g. Product.ProductNameColumn): int records = new Select(Product.ProductIDColumn, Product.ProductNameColumn). From<Product>().Get...

Subsonic 3 - What is the difference between these approaches?

This method works fine: Person p = new Person(3); p.Name = "Bob"; p.Update(); However if I have an IQueryable foreign key collection the below fails var foreignItems = Person.Find(x => x.ID == 3) foreach(Person p in foreignItems) { p.Name = "Bob"; p.Update(); /*THROWS EXCEPTION */ } Exception is thrown in Repository Update as i...

SubSonic SimpleRepository - Default Value

Hopefully there's a solution/patch to SubSonic SimpleRepository where I can specify a column/property with a default value so that it populates the DB with the default value set. I'm still reading the SubSonic Docs and just ran across that issue. Maybe someone has an answer/solution for this that I can start using. ...

SUBSONIC loadbykey in Oracle 11 error

Does anyone knows why when I run the next command comes the message error ORA-00904: "SYSTEM"."SITUACAO"."IDSITUACAO": identificador inválido The obj.save() or SqlQuery qry = new Select().From("SITUACAO") run perfect !! only loadbykey() get an error . THE CODE : Situacao x = new Situacao(); x.LoadByKey(1); thanks ...

Subsonic FetchByParameter versus Query

I am getting some memory errors when I attempt to pull back approx 150,000 or more rows into my collection using subsonic. Currently I am getting an out of memory error when this occurs. Upon further review and debugging I am noticing that the following line seems to be the culprit of the error: OrdersCollection orders = new OrdersCo...

SetIsNew vb.net error

When updating the settings.ttinclude and doing "run custom tool" on all .tt files, I'm getting.... Class ‘TestAccount’ must implement ‘Sub SetIsNew (is Loaded as Boolean)’ for interface ‘SubSonic.Schema.IActiveRecord' I'm very familiar with SubSonic 2 but just getting setup on SubSonic 3. Is this a vb.net only issue? Thanks, John ...

subsonic with support for caching

Having a project with following requirements in mind. data reading intensive application. 100 max concurrent users a times. Application have very high Though data is huge it is getting modified only once a day Decided to use subsonic cause of ease of development and potential to work in high traffic environment. Though few things ...

WPF Binding in SubSonic 3 to Foreign Keys

In WPF and SubSonic 2 using Active Record, I was able to bind to properties in rows from one table and easily follow the foreign key references (properties that returned the foreign key row representation) to bind to fields in the foreign key table. With SubSonic 3 and ActiveRecord, I'm not quite sure how to do this (easily) anymore. I...

Subsonic 3.0 and SqlHierachyID

I am having trouble with Subsonic 3.0 generating an object for a table which contains the new HeirachyID datatype. From what I have found, there is no corrosponding .Net type, and subsonic doesn't seem to know how to handle the hierachyid data. Error that is thrown: Object of type 'Microsoft.SqlServer.Types.SqlHierarchyId' cannot be...

Relationships and Lazy Loading in SubSonic 3.0

Hello, I'm playing around with SubSonic 3.0 at the moment, and it looks really straight-forward (except that I still have to decide between SimpleRepository and ActiveRecord, but that's another story). However, as the documentation is a bit sparse, I am not sure if it supports foreign-relationships and lazy-loading. Essentially, I have...

subsonic asp.net 3 layer architecture object model

Hi there, i've been using subsonic for two years now (actually i'm using 2.1 version in my projects right now). I'd like to structure a new project this way: presentation layer + business layer + data layer with an object model, vertical to the 3 layers, that models business entities. The matter is that subsonic, through the db reading,...

Subsonic 3: SimpleRepository. How to map enum to a table column

I have a DB table (Profile) to describe a person. This table has a column "Sex" (int). In .NET part I have: public enum Sex { Male = 1, Female = 2 } public class Profile{ public int ID {get; set;} public Sex Sex {get; set;} } ... SimpleRepository _repo = new SimpleRepository("ConnectionString"); _repo.Add<Profile>(profile); ...

newly added row to DataGridView not showing

I have a DataGridView that allows users to enter new information. Using subsonic I Save the new info to the database. And this works correctly. My problem is that after the Save is done the newly added row disapears from the grid. I tried to Reload the form, but I get an error "Operation is not valid because it results in a reentrant cal...

QuerySurface Template?

Hello, i've been wondering for few hours now how can i get the QuerySurface integrated in my project. I am using the SubSonic 3.0 ActiveRecord T4 templates with great success, As i have been doing query with LINQ, i need also the Update, Insert and Delete functionality which according to the documentation utilize QuerySurface. http:...