subsonic

problem when binding mysql tinyint with subsonic 3 and datagridview

i created a datalayer using subsonic. however when i am selecting my data, i get the following exception. System.ArgumentException was unhandled Message="Object of type 'System.Boolean' cannot be converted to type 'System.SByte'." Source="mscorlib" StackTrace: at System.RuntimeType.CheckValue(Object value, Binder binder...

SubSonic 2.2 and ASP.NET gridview

Hi all, I'm trying to show a custom column in my gridview which displays a content type based on a couple of boolean fields in my database. Everything works fine but it's causing a lot of overhead the way I do it now.. like this: <ItemTemplate> <asp:Label ID="lblType" runat="server" Text='<%# GetType((int)DataBinder.Eval(Container.D...

SubSonic 3 Linq Joining error after using CleanUp

I am using the ActiveRecord SubSonic3 templates. Everything was working just dandy, then I decided I wanted things to look a bit better. See my database has field that look like this: SomeKey_id SomeOtherKey_id I wanted to clean it up so that it would instead be SomeKeyID SomeOtherKeyID when accessing it through SubSonic. So I ad...

How to configure subsonic 3.0.0.4 using mysql with Visual Studio 2010?

I downloaded subsonic 3.0.0.4 and i am trying now to configure it to work with mysql and Visual studio 2010. My project is .net 3.5 and i am creating a data access layer class library to use later in a website. I can't figure which files i should add to my project and where to edit. Last step i reached is in this screen shot: ...

Issue with Linq Join (subsonic)

I have this slice of code IQueryable<Dealer> dealers = from dealer in Dealers join address in AddressesUS on dealer.DealerId equals address.OwnerId where dealer.Country == country && address.Owner == (int)Contact.OwnerType.Dealer select new Dealer() { DealerId = dealer.DealerId, DealerName = dealer.De...

Subsonic.DataService Missing in Subsonic 3.0.0.4?

How do I execute QueryCommand Object in SubSonic 3.0.0.4 without DataService? ...

SubSonic not recognizing SQLite foreign keys

I'm using SubSonic 3.0.0.3 and I can't seem to get the ActiveRecord .tt files to recognize and generate code for the foreign keys and relationships in my SQLite database. I think it generates everything else just fine, but after looking at other snippets online it looks like there should be more generated code than just single classes ...

Problems while generating code with SubStage / Subsonic (Hangs on generating structs)

I have an old project and it uses Subsonic for DB access. I tried to regenerate the code for tables, etc... I tried using SubStage (I used 2.1 because the "old" code is using this version as well). It seems to work fine until it hits the "generating structs...". It just hangs there. I didn't find any log to help me find the problem. I ...

Subsonic 2.1 : Way to ignore a column while generating code?

For some reason, a row named "rowguid" with a "uniqueidentifier" parameter was added to some tables on an already existing project. While regenerating the code, I found out that a method named "Insert(string Key)" was used, but doesn't exists anymore (it's now Insert(string Key, Guid varRowguid). Is there a way to "ignore" a column wh...

Error on updating record with Subsonic (MySql)

Hi, I am using the following code to update a record in my table: var usr = test.Data.user.SingleOrDefault(y => y.id == 1); usr.name = "test"; usr.Save(); retrieving the row works perfectly but when I Save() I get a NullReferenceException breaking in the file database.cs line 412, which...

Subsonic Syntax Question (with GroupBy)

Is there a way to do this : SubSonic.Where filter = new SubSonic.Where(); filter.ColumnName = Region.Columns.Region; filter.Comparison = SubSonic.Comparison.IsNot; filter.ParameterValue = null; SubSonic.Aggregate orderBy = new SubSonic.Aggregate(Region.Columns.RegionName, SubSonic.AggregateFunction.GroupBy); RegionCollection regions =...

Add Subsonic 3.0.0.4 in Visual Studio 2010

I've created a console application focused on C#3.5 and added a reference to System.Web, System.Configuration and Subsonic.Core. Also have in config file <?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="UpdateCotswolds.Properties.Settings.Live_IntegraConnecti...

Can I create a Generic delete method to delete any subsonic activerecord<T> object?

We have a C# WinForms app with a number of screens that support CRUD operations. We've been trying to create a generic method in the base form class to delete any subsonic ActiveRecord class. This has proved to be a challenge. calling Delete() for a subsonic type involves calling the static method on the abstract base ActiveRecord<T> ...

Subsonic help, how to list only the first record

Hi I'm doing a little report using subsonic I'm pretty noob And I can't figure how to list only the first record in my report I'm doing something like: new Select("id,Name,place,group").From(User.Schema) .InnerJoin(Profile.Schema) .InnerJoin(userGroup.Schema) ...

SubSonic generation of tables with columns as ColumnX

This doesn't make much sense to me. We had this happen twice recently when generating SubSonic objects for a database table or view columns got renamed to ColumnX. The first time it made sense because the column name is Value, a C# keyword. But the second time it happened, the table's column name is Grade, which is not a keyword or re...

SubSonic 3.0 , I'm missing SubSonic.Query

I probably missed something in the .tt configuration for some reason my intellisense when I type SubSonic.Query or Query = new Query(DB.Table) is not highlighting and giving me an error. Anybody has a problem like this? appreciate any help. thanks ...

SubSonic 2.1 Generating ANSISQL for SQL Server 2008 SP1

I have a previously developed project that I am working on now. The project uses SubSonic 2.1 as ORM and it has been working fine since we decided to move to a newer server. The new server has SQL Server 2008 SP1 and now SubSonic is not behaving as usual. I debugged the case and found that SubSonic is now generating ANSISQL queries inst...

Subsonic Oracle autoincrement problem

Hello guys; I think this question has been done before, but I don't find a clear answer. I have migrated SQl Server 2005 database to oracle 11. I am using subsonic 2.1. I have manged to create all the data layer classes, and generates everything well. But the problem turns up when I try to make an insert in the database: Oracle does not...

SQLite and sub-sonic

Does Subsonic supports SQLite, if so can subsonic work with Win7 Phone ? ...

Connection string not found when trying to query database under SubSonic

I get this error no matter what version of SubSonic I use. When I query the database for data, it errors out, saying it can not connect to the database. However, it is able to generate the .cs classes(ActiveRecord, Context, etc) when told to do so. Any help is appreciated. Thanks folks... ...